OneStopGate.Com
OnestopGate   OnestopGate
   Friday, December 27, 2024 Login  
OnestopGate
Home | Overview | Syllabus | Tutorials | FAQs | Downloads | Recommended Websites | Advertise | Payments | Contact Us | Forum
OneStopGate

GATE Resources
Gate Articles
Gate Books
Gate Colleges 
Gate Downloads 
Gate Faqs
Gate Jobs
Gate News 
Gate Sample Papers
Training Institutes

GATE Overview
Overview
GATE Eligibility
Structure Of GATE
GATE Coaching Centers
Colleges Providing M.Tech/M.E.
GATE Score
GATE Results
PG with Scholarships
Article On GATE
Admission Process For M.Tech/ MCP-PhD
GATE Topper 2012-13
GATE Forum




GATE 2025 Exclusive
Organizing Institute
Important Dates
How to Apply
Discipline Codes
GATE 2025 Exam Structure

GATE 2025 Syllabus
Aerospace Engg..
Agricultural Engg..
Architecture and Planning
Chemical Engg..
Chemistry
Civil Engg..
Computer Science / IT
Electronics & Communication Engg..
Electrical Engg..
Engineering Sciences
Geology and Geophysics
Instrumentation Engineering
Life Sciences
Mathematics
Mechanical Engg..
Metallurgical Engg..
Mining Engg..
Physics
Production & Industrial Engg..
Pharmaceutical Sciences
Textile Engineering and Fibre Science

GATE Study Material
Aerospace Engg..
Agricultural Engg..
Chemical Engg..
Chemistry
Civil Engg..
Computer Science / IT
Electronics & Communication Engg..
Electrical Engg..
Engineering Sciences
Instrumentation Engg..
Life Sciences
Mathematics
Mechanical Engg..
Physics
Pharmaceutical Sciences
Textile Engineering  and Fibre Science

GATE Preparation
GATE Pattern
GATE Tips N Tricks
Compare Evaluation
Sample Papers 
Gate Downloads 
Experts View

CEED 2013
CEED Exams
Eligibility
Application Forms
Important Dates
Contact Address
Examination Centres
CEED Sample Papers

Discuss GATE
GATE Forum
Exam Cities
Contact Details
Bank Details

Miscellaneous
Advertisment
Contact Us


Home » GATE Study Material » Electrical Engineering » Digital Signals and Data Representation » Data Representations in Computer Programs

Digital Signals and Data Representation

Looking for GATE Preparation Material? Join & Get here now!

** Gate 2013 Question Papers.. ** CEED 2013 Results.. ** Gate 2013 Question Papers With Solutions.. ** GATE 2013 CUT-OFFs.. ** GATE 2013 Results.. **

Data Representations in Computer Programs

Data Representations in Computer Programs

Representations and Conversions


Integers A single byte can store an integer that takes on a value from 0 to 255. The interpretation of the bits in the byte uses normal binary representations for numbers. You might not see this representation often. unsigned char x;


A single byte can also store an integer that takes on a value from -128 to +127. In this case, one bit in the byte is used as a sign bit. In C, an integer of this type is declared using:


char x;
or
short int x; Larger integers can be stored using two bytes. Two bytes can store 216 - 1 or 65536 numbers from 0 to 65535. The numbers represented can run from 0 to 65535. In C, an integer of this type is declared using: unsigned int x; Signed integers take two bytes and use one bit to store the sign (plus or minus), and have a range from -32768 to +32767, and are declared like this: int x; NOTE: In some cases, the declaration above will give you an integer that takes four bytes, and which can have much larger values.

Finally, there is a long integer that is used for large integers. A long integer takes four bytes, and will handle integers from -2,147,483,648 to -2,147,483,647. The form of the declaration is:

long int x; Now, none of these representations will handle something like 2.59 - a number that is not an integer. You need to use a floating point representation for those numbers.
Data Type
Number of Bytes
Number of Bits
Float
4
32
Double
8
64
Long Double
12
96

float 4 32
double 8 64
long double 12 96

Floating Point Numbers

IEEE has written a standard for floating point numbers. The simplest IEEE representation uses a 32 bit word (four bytes) and looks something like this:

S E E E E E E E E S F F - - F F F F F F F F F F
0 1 8 9 31
  • This representation is short a few bits - just to be sure that it will "fit".
  • There are two sign bits in the representation. The exponent can be positive or negative, and the mantissa can have either sign as well.
This representation can be difficult to unravel, but S is the sign bit, and the eight bit "E" number is a signed integer representing the exponent. The "F" number determines the mantissa and is actually the floating point part in a 1.X representation, where X is the number represented by F. A four bit floating point number has a declaration like this.
    float x;
What you need to remember is that a floating point number is stored as an exponent and a mantissa along with a sign. That means that - in the four byte representation - there are only 24 bits devoted to the mantissa (significant figures) and you have to remember not to overestimate how precise the representation is.

If you want a more precise representation of a number, you can use a double precision floating point representation that uses eight (8) bytes. The declaration is:

    double x;

ASCII coded numbers

Numerous instruments transmit measurement data using ASCII coded numbers. In an ASCII coded number. For example, a measurement that yields a value 3.145 would be transmitted to a computer with the following sequence of characters.

  • An ASCII character 3,
  • An ASCII character ., (That's a period!)
  • An ASCII character 1,
  • An ASCII character 4,
  • An ASCII character 5,
  • A separator that could be either one of these:
    • If the next piece of data is stored in another column, then the next character in the file should be an ASCII character Tab, (A tab character) That would produce a "Tab-delimited" file since the delimiter is a tab character.
      • There are times when "Comma-delimited" files are used. In that situation, the tab character is replaced by a comma.
    • If the next piece of data starts another row, then it is often the case that two characters are used. Those characters are an ASCII character CR, (Carriage return) and an ASCII character LF, (Line Feed). (In manual typewriter days, the carriage return took the carriage back to the first position at the left of the page, and the line feed advanced to the next line.)
This approach can be used to put data into a file for data storage.



Discussion Center

Discuss/
Query

Papers/
Syllabus

Feedback/
Suggestion

Yahoo
Groups

Sirfdosti
Groups

Contact
Us

MEMBERS LOGIN
  
Email ID:
Password:

  Forgot Password?
 New User? Register!

INTERVIEW EBOOK
Get 9,000+ Interview Questions & Answers in an eBook. Interview Question & Answer Guide
  • 9,000+ Interview Questions
  • All Questions Answered
  • 5 FREE Bonuses
  • Free Upgrades
GATE RESOURCES
 
  • Gate Books
  • Training Institutes
  • Gate FAQs
  • GATE BOOKS
     
  • Mechanical Engineeering Books
  • Robotics Automations Engineering Books
  • Civil Engineering Books
  • Chemical Engineering Books
  • Environmental Engineering Books
  • Electrical Engineering Books
  • Electronics Engineering Books
  • Information Technology Books
  • Software Engineering Books
  • GATE Preparation Books
  • Exciting Offers



    GATE Exam, Gate 2009, Gate Papers, Gate Preparation & Related Pages


    GATE Overview | GATE Eligibility | Structure Of GATE | GATE Training Institutes | Colleges Providing M.Tech/M.E. | GATE Score | GATE Results | PG with Scholarships | Article On GATE | GATE Forum | GATE 2009 Exclusive | GATE 2009 Syllabus | GATE Organizing Institute | Important Dates for GATE Exam | How to Apply for GATE | Discipline / Branch Codes | GATE Syllabus for Aerospace Engineering | GATE Syllabus for Agricultural Engineering | GATE Syllabus for Architecture and Planning | GATE Syllabus for Chemical Engineering | GATE Syllabus for Chemistry | GATE Syllabus for Civil Engineering | GATE Syllabus for Computer Science / IT | GATE Syllabus for Electronics and Communication Engineering | GATE Syllabus for Engineering Sciences | GATE Syllabus for Geology and Geophysics | GATE Syllabus for Instrumentation Engineering | GATE Syllabus for Life Sciences | GATE Syllabus for Mathematics | GATE Syllabus for Mechanical Engineering | GATE Syllabus for Metallurgical Engineering | GATE Syllabus for Mining Engineering | GATE Syllabus for Physics | GATE Syllabus for Production and Industrial Engineering | GATE Syllabus for Pharmaceutical Sciences | GATE Syllabus for Textile Engineering and Fibre Science | GATE Preparation | GATE Pattern | GATE Tips & Tricks | GATE Compare Evaluation | GATE Sample Papers | GATE Downloads | Experts View on GATE | CEED 2009 | CEED 2009 Exam | Eligibility for CEED Exam | Application forms of CEED Exam | Important Dates of CEED Exam | Contact Address for CEED Exam | CEED Examination Centres | CEED Sample Papers | Discuss GATE | GATE Forum of OneStopGATE.com | GATE Exam Cities | Contact Details for GATE | Bank Details for GATE | GATE Miscellaneous Info | GATE FAQs | Advertisement on GATE | Contact Us on OneStopGATE |
    Copyright © 2024. One Stop Gate.com. All rights reserved Testimonials |Link To Us |Sitemap |Privacy Policy | Terms and Conditions|About Us
    Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Interview Questions | India Job Forum | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Free Classifieds | Jobs Assist | Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Web Hosting | Quick Site Kit | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Software Testing Interview Questions | Free Online Exams | The Galz | Top Masala | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World
    C Interview Questions | C++ Interview Questions | Send Free SMS | Placement Papers | SMS Jokes | Cool Forwards | Romantic Shayari