Week2 Lecture Chapter1
Week2 Lecture Chapter1
COMPOSITION
Course Information
Byte Integer
Unsigned (0-255)
Signed (-128-+127)
Word Integer
Unsigned (0-65535)
Signed (-32768-+32767)
8
1.3.2 Integer Formats in Microcomputers
9
Signed data
Sign-Magnitude Representation ( Original binary
data )
One’s Complements (Radix-1 complements)
Two’s Complements (Radix complements)
1.3.2 Integer Formats in Microcomputers
10
Signed data
Sign-Magnitude Representation ( Original binary
data )
One’s Complements (Radix-1 complements)
Two’s Complements (Radix complements)
1.3.2 Integer Formats in Microcomputers
11
Sign-Magnitude Representation
Byte
7 6 5 4 3 2 1 0
Word
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Sign-Magnitude Representation
The most significant bit is a sign bit.
Zero identifies a positive number
One identifies a negative number
Numerical bits are the same
1.3.2 Integer Formats in Microcomputers
13
Sign-Magnitude Representation
Positive
Sign bit is 0
Numeric bits is magnitude
Negative
Sign bit is 1
Numeric bits is magnitude
1.3.2 Integer Formats in Microcomputers
14
Sign-Magnitude Representation
[+1D ]=00000001B=01H
[-1D ]=10000001B=81H
1.3.2 Integer Formats in Microcomputers
15
One’s Complements
Positive
same as its original binary data
Negative
invert
1.3.2 Integer Formats in Microcomputers
16
Sign-magnitude data
[+1D ]=00000001B=01H
[-1D ]=10000001B=81H
One’s Complements
[+1D ]=00000001B=01H
[-1D ]=11111110B=FEH
1.3.2 Integer Formats in Microcomputers
17
1.3.2 Integer Formats in Microcomputers
18
Two’s Complements
Positive
same as its original binary data
Negative
invert and then add 1
1.3.2 Integer Formats in Microcomputers
19
[-1D ]=10000001B=81H
One’s Complements
[+1D ]=00000001B=01H
[-1D ]=11111110B=FEH
Two’s Complements
[+1D ]=00000001B=01H
[-1D ]=11111111B=FFH
1.3.2 Integer Formats in Microcomputers
20
1.3.2 Integer Formats in Microcomputers
21
Range of representation
Sign-Magnitude Representation
1.3.2 Integer Formats in Microcomputers
23
Range of representation
Sign-Magnitude Representation
1.3.2 Integer Formats in Microcomputers
24
Range of representation
One’s Complements
1.3.2 Integer Formats in Microcomputers
25
Range of representation
One’s Complements
1.3.2 Integer Formats in Microcomputers
26
Range of representation
Two’s Complements
1.3.2 Integer Formats in Microcomputers
27
Range of representation
Two’s Complements
1.3.2 Integer Formats in Microcomputers
28
Solution
[23]=00010111B=17H
[-23]=11101001B=0E9H
[15]=00001111B=0FH
[-15]=11110001B=0F1H
1.3.2 Integer Formats in Microcomputers
32
Solution
1.3.2 Integer Formats in Microcomputers
33
Solution
1.3.2 Integer Formats in Microcomputers
34
Solution
1.3.2 Integer Formats in Microcomputers
35
Solution
1.3.2 Integer Formats in Microcomputers
36