Professional Documents
Culture Documents
1 Data Representation - L8 - Negative Numbers in Binary
1 Data Representation - L8 - Negative Numbers in Binary
1 Data Representation - L8 - Negative Numbers in Binary
8 Number System
Previously we Learned
• Binary arithmetic
• 1’s complement
• 2’s complement
LESSON OBJECTIVE
KEYWORDS
SUCCESS CRITERIA
• Complement
• Sign bit • Able to represent negative
number in vinary form.
• MSB
Negative binary numbers
• We represent negative binary numbers using a minus
symbol in front of them. In computer number
representation, these numbers can be distinguishable with
the help of an extra bit or flag called sign bit or sign flag in
the Binary number representation system for signed
numbers.
• This extra bit is called sign bit or sign flag which has a
value of sign bit is 0 for positive numbers and 1 for negative
binary numbers.
Ways to represent magnitudes
8 4 2 1
0 0 0 0 0
+ 5 = 0 101
0 0 0 1 1
0 0 1 0 2
+ 7 = 0 111
0 0 1 1 3
0 1 0 0 4 + 3 = 0 011
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
MSB is
the
sign bit If the sign bit is “1”, this means the number is negative in value.
8 4 2 1
1 0 0 0 -0
- 5 = 1 101
1 0 0 1 -1
1 0 1 0 -2
- 7 = 1 111
1 0 1 1 -3
1 1 0 0 -4 - 3 = 1 011
1 1 0 1 -5
1 1 1 0 -6
1 1 1 1 -7
8 4 2 1
1 1 1 1 -7
1 1 1 0 -6
1 1 0 1 -5
1 1 0 0 -4
1 0 1 1 -3
1 0 1 0 -2
1 0 0 1 -1
1 0 0 0 -0
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
8 4 2 1
1 0 0 1 -7
Use 2’s complement to represent the negative numbers
1 0 1 0 -6
1 0 1 1 -5
1 1 0 0 -4
1 1 0 1 -3
1 1 1 0 -2
1 1 1 1 -1
01 0 0 0 -0
0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
PLENARY
Evaluation Worksheet
3! 2! 1!
1.
3 Things I 2.
learned
3.
1.
2 Interesting
2.
facts
1 Question
1.