Number_Representation_brief

Number_Representation_brief - CoE - ECE 0142 Computer...

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

View Full Document Right Arrow Icon
1 CoE - ECE 0142 Computer Organization Slides adapted from Ron Hoelzeman Lecture 2 Number Representation
Background image of page 1

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

View Full DocumentRight Arrow Icon
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)
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Powers of 2
Background image of page 4
5 ASCII Standard Code 1100100 - d
Background image of page 5

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

View Full DocumentRight Arrow Icon
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
Background image of page 6
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
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 Number Representation ± Integers ± Fractions ± Negative numbers ± Floating point
Background image of page 8
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 .
Background image of page 9

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

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online