The 8421 BCD Code: Decimal Number 4926
The 8421 BCD Code: Decimal Number 4926
The 8421 BCD Code: Decimal Number 4926
QUIZ
Convert the BCD coded number
1000 0111 0001 into decimal.
QUIZ
Convert the decimal number
350 to its BCD equivalent.
Decimal Number
BCD Coded Number
Sample Problem:
Decimal
Excess-3
QUIZ
1. To form an excess-3 coded number,
decimal 3 is added to the decimal
number and this is converted to its
4-bit binary code. (True or False)
True
71
Decimal
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Gray code
00000
00001
00011
00010
00110
00111
00101
00100
01100
01101
01111
01110
01010
01011
01001
01000
11000
QUIZ
1. The Gray code is not a type of BCD
code. (True or False)
2. The most important characteristic
of the ____________ (BCD, Gray
code) is that only one digit changes
state as you increment or decrement
the count.
3. The Gray code is commonly
associated with input/output devices
such as an optical encoder of a
shafts angular position. (True or
False)
True
Gray code
True
The
ASCII
Code
QUIZ
1. A common 7-bit code used to represent
numbers, letters, punctuation marks,
and control characters is known by
the acronym __________.
2. The acronym ASCII stands for
__________________________.
3. Extended ASCII code is a(n)
__________ (8-bit, 10-bit) code
which adds graphic and math
symbols to ASCII for a total of
256 symbols.
ASCII
American Standard
Code for Information
Interchange
8-bit
2s Complement Notation
2s complement representation - widely
used in microprocessors.
Represents sign and magnitude
MSB
LSB
Sign bit (0 = + ; 1 = -)
Decimal:
-7
2s Complement:
1001
+7
+4
0111
0100
+1
0001
0
0000
-1
-4
1111
1100
2s Complement - Conversions
Converting
1011
Add 1
- 4 = 1 1 0 0 (2s Complement)
2s Complement to
Binary
1 1 0 0 (2s C)
0011
1s
complement
Add 1
0 1 0 0 (Binary)
QUIZ
Q#1Convert
the
decimal
number
4
toto2s2scomplement.
Q#2Convert
the
decimal
number
-7
complement.
Q#3Convert
the
decimal
number
1
toto2s
complement.
Q#4Convert
the
decimal
number
+6
2s
Q#5- Convert the decimal number -8 to 2s complement.
complement.
47(decimal)
16(decimal)
(decimal)
8 (decimal)
(decimal)
0100
0111
0001
0110
1000
1011
1000
Not1110
needed
0111
1100
2s
CC
1001
2s
1111
2s
C
Not
needed
1000
2sC
ANS:
-4
2sC
ANS:
-7-1===1100
1001
2sC
ANS:
1111
2sC
ANS:
+6
=
0110
ANS: -8 = 1000 2sC
2sC
QUIZ
Q#1Convert
the
2s
complement
number
1110
totodecimal.
Q#2Convert
the
2s
complement
number
0101
decimal.
Q#3Convert
the
2s
complement
number
1001
Q#4- Convert the 2s complement number 1111 to
to decimal.
decimal.
Not1110
needed
1001
1111
Step 1: convert to 1s complement
Not0001
needed
0110
0000
Step 2: Add +1
0010
binary
0101
binary
0111
0001binary
binary
Step 3: convert binary to decimal
25decimal
71decimal
decimal
decimal
ANS:
1110
2sC
==-2
decimal
ANS:
0101
2sC
+5
decimal
ANS:
1001
2sC
=
-7
ANS: 1111 2sC = -1 decimal
decimal
Adding/Subtracting in 2s Complement
2s complement notation makes it possible
to add and subtract signed numbers
(Decimal
)
(- 1)
+ (- 2)
(- 3)
2s
Complement
1111
+ 111
0
1 1 1 0 1 2s complement
Discar
d
(+1)
+ (- 3)
(- 2)
0001
+ 110
1
11 1 0
2s complement
QUIZ
Add the following 2s complement numbers:
(+5)
+ (4)
(+1)
0 1 0 1
+ 1 1 0
0
10 0 0 1
Discard