Digital System Design - Chapter1
Digital System Design - Chapter1
N ( an an 1an 2 ...a1a0 ) R
an R n an 1 R n 1 .... a2 R 2 a1 R1 a0
N
an R n 1 an 1 R n 2 .... a2 R1 a1 Q1 , reminder
remainder a
0
R
Q1
an R n 2 an 1 R n 3 .... a3 R1 a2 Q2 , reminder
remainder a
1
R
...
This process is continued until we finally obtain an
Conversion Example----Convert 5310 to binary.
Conversion of a decimal fraction to base R can be done
using successive multiplications of R
Example: Convert .62510 to binary.
Example: Convert 0.710 to binary.
Conversion (2)
11101 10000
-10011 - 11
Binary Arithmetic
1111 multiplicand
1101 multiplier
1111 1st partial product
0000 2nd partial product
(01111) sum of first two partial products
1111 3rd partial product
(1001011) sum after adding 3rd partial product
1111 4th partial product
11000011 final product (sum after adding 4th
partial product)
Binary Arithmetic
Positive numbers
N is represented by a 0 followed by the magnitude as in
the sign and magnitude system
Negative numbers
-N is represented by its 2’s complement N*
How to calculate the 2’s complement?
For the word length n bits
N * 2n N
The 1’s complement
Negative numbers
-N is represented by its 1’s complement N
For the word length n bits
N (2n 1) N
The 2’s and 1’s complement
N * N 1
8-4-2-1
Decimal 6-3-1-1 Excess-3 2-out-of-5 Gray
Code
Digit Code Code Code Code
(BCD)
0 0000 0000 0011 00011 0000
1 0001 0001 0100 00101 0001
2 0010 0011 0101 00110 0011
3 0011 0100 0110 01001 0010
4 0100 0101 0111 01010 0110
5 0101 0111 1000 01100 1110
6 0110 1000 1001 10001 1010
7 0111 1001 1010 10010 1011
8 1000 1011 1011 10100 1001
9 1001 1100 1100 11000 1000
ASCII Code