Lec 04
Lec 04
Lec 04
4
Number Systems
32-bit f.p. number (recap)
Addition
Adding mantissas after adjusting exponents
Subtraction
Subtracting mantissas after adjusting
exponents
Multiplication
Multiplying mantissas and adding exponents
Division
Dividing mantissas and subtracting exponents
64-bit f.p. number (recap)
0 to F
0 0000 0 8 1000 8
1 0001 1 9 1001 9
2 0010 2 10 1010 A
3 0011 3 11 1011 B
4 0100 4 12 1100 C
5 0101 5 13 1101 D
6 0110 6 14 1110 E
7 0111 7 15 1111 F
Binary-Hexadecimal conversion (recap)
D 6 B 9 6
Hexadecimal to Binary Conversion
FD13
Sum-of-Weights
Decimal-Hexadecimal Conversion (recap)
Repeated Division by 16
Hexadecimal Arithmetic (recap)
Hexadecimal Addition
Carry generated
Hexadecimal Subtraction
Borrow weight 16
Octal Number System
Base 8
0, 1, 2, 3, 4, 5, 6, 7
Representing Binary in compact form
1101100000110 = 15406
2 8
Sum-of-Weights
Decimal-Octal Conversion
Repeated Division by 8
Octal Addition & Subtraction
Octal Addition
Carry generated
Octal Subtraction
Borrow weight 8
Binary to Octal Conversion
011010110101110010110
011 010 110 101 110 010 110
3 2 6 5 6 2 6
1011011101001
1 011 011 101 001
001 011 011 101 001
1 3 3 5 1
Octal to Binary Conversion
1726
001 111 010 110
Sum-of-Weights
4037
(4 x 83) + (0 x 82) + (3 x 81) + (7 x 80)
(4 x 512) + (0 x 64) + (3 x 8) + (7 x 1)
2048 + 0 + 24 + 7
2079
Repeated Division by 8
Carry 1
7602
+ 4771
14573
Octal Subtraction
Borrow 11
7602
- 4771
2611
Alternate Representations
Excess Code
BCD Code
Gray Code
Excess Code
23 0010 0011
45 0100 0101
68 0110 1000
23 0010 0011
49 0100 1001
72 0110 1100
1100 is illegal BCD number
BCD Addition
23 0010 0011
49 0100 1001
72 0110 1100
0110
0111 0010
Gray Code
Braking Systems
Un-Weighted Code
Gray Code
A A
B B
C C
Numbers 0 to 9
ASCII 0110000 (30h) to 0111001 (39h)
Alphabets a to z
ASCII 1100001 (61h) to 1111010 (7Ah)
Alphabets A to Z
ASCII 1000001 (41h) to 1011010 (5Ah)
Control Characters
ASCII 0000000 (0h) to 0011111 (1Fh)
Error Detection
Odd Parity
Odd Parity Error Detection