Professional Documents
Culture Documents
4 8 August: Lect Date: Topics
4 8 August: Lect Date: Topics
8 August 2012
Binary Arithmetic
of
Signed Binary Numbers
8 August 2012 6
Binary Codes
4+5
4+9
0100+1001 = ?
If the binary sum is > 1001, we add 0110 to obtain the correct BCD
sum.
0100+1001 = 1101>1001
So 1101+0110= 1 0011
13 in BCD form.
8 August 2012 EEE/CS/ECE F215 9
Binary weighted Codes
2-4-2-1 Code
− Weighted code with w3 = 2, w2 = 4, w1 = 2, w0 = 1
Excess-3 Code
− Obtained from the 8-4-2-1 (weighted code).
− Add 3 (00112) to each of the codes.
What is the relation between 4 and 5 and their Excess 3 and 2421
code representations?
Excess 3 and 2421 codes are example of self complementing code.
Gray Code(s)
− Unweighted code
− Code values for successive decimal digits differ in
exactly one bit.
− Example: 2-bit Gray Code
Decimal Binary Gray Code
0 00 00
1 01 01
2 10 11
3 11 10
EEE/CS/ECE F215 13
8 August 2012