Number_Representation_brief

# Number_Representation_brief - CoE ECE 0142 Computer...

This preview shows pages 1–10. Sign up to view the full content.

1 CoE - ECE 0142 Computer Organization Slides adapted from Ron Hoelzeman Lecture 2 Number Representation

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Data Representation ± Computers manipulate discrete digital quantities - that is 1’s or 0’s ± Example representations of data Numeric Non Numeric Binary ASCII Decimal EBCDIC (Extended Binary Coded Decimal Interchange Code) BCD (binary-coded decimal)
3 Examples of Data Binary - 000001010011100 668 BCD - 0000 0010 0011 0100 1100 0 2 3 4 ?? ASCII - 0000000 NUL 0110000 0 0110001 1 0110010 2 Does not exist because 12 is not a decimal digit

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Powers of 2
5 ASCII Standard Code 1100100 - d

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 Data Representation Examples 16 bit word Byte 1 Byte 2 Binary 0000 0000 0001 0101 21 BCD 0011 0001 0010 0001 3 1 2 1 ASCII 0011 0010 0011 0001 21
7 Pure Binary vs. BCD ± Advantages Scaling by a factor of 10 (or a power of 10) is simple, especially helpful for non-integer quantities (e.g., in financial calculations). Rounding at a decimal digit boundary is easier Conversion to a character form or for display is a simple per- digit mapping. ± Disadvantages Some arithmetic operations are more complex to implement. BCD does not make optimal use of storage

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 Number Representation ± Integers ± Fractions ± Negative numbers ± Floating point
9 Number Representation Base 10 1109 10 = 1 10 3 + 1 10 2 + 0 10 1 + 9 10 0 General Form a n-1 a n-2 …a 2 a 1 a 0 .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 09/01/2009 for the course COE 0142 taught by Professor Staff during the Summer '08 term at Pittsburgh.

### Page1 / 38

Number_Representation_brief - CoE ECE 0142 Computer...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online