Professional Documents
Culture Documents
Digital Electronics
Instructor: Tishna Sabrina
Fall 2014
Lecture 2
Binary Systems
Binary Numbers
10/1/2014
1-bit binary
Number
2-bit binary
Number
3-bit binary
Number
4-bit binary
Number
0
1
00
01
10
11
000
001
010
011
100
101
110
111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
Signed magnitude
1s complement form
2s complement form
10/1/2014
Signed magnitude
10/1/2014
-8510 = 110101012
+010 = 000000002
-010 = 100000002
1s complement form
10/1/2014
+8510 = 010101012
-8510 = 101010102
+010 = 000000002
-010 = 111111112
2s complement
10/1/2014
+8510 = 010101012
-8510 = 101010112
+010 = 000000002
-010 = 000000002
Binary Arithmetic
Binary Addition
1001101
+ 0010010
---------------1011111
10/1/2014
Binary Subtraction
A B = A + (-B) = A + 2s complement of B
+6
+6
- +3
+ (-3)
------------+3
+3
Answer: 0011
10/1/2014
0110
+ 1101
---------10011
+3
3
0011
-4
+ (-4)
+ 1100
----------------------1
-1
1111
Answer: -0001
Digital Electronics: Lecture 2
Binary Subtraction
A B = A + (-B) = A + 1s complement of B
+6
- +3
------+3
10/1/2014
+6
+ (-3)
------+3
0110
+ 1100
---------10010
+1
--------0011
+3
3
-4 +(-4)
-------------1
-1
Answer: -0001
0011
+ 1011
----------1110
Binary Multiplication
10/1/2014
0111
0011
------------------0111
0111x
0000xx
0000xxx
------------------00010101
10
Binary Division
10/1/2014
11
Binary Codes
BCD
BCD Addition
10/1/2014
12
BCD Addition
1001
0100
------1101>910
1101
+ 0110
---------00010011
9
+9
------18
1 3
10/1/2014
1001
+1001
-----------10010
10010
+ 0110
----------00011000
1 8
13
Binary Codes
Gray Code
10/1/2014
14
Binary Codes
Excess 3-Code
2421
1-out-of-n code
ASCII Code
Biquinary
10/1/2014
15