Professional Documents
Culture Documents
Digital Logic Design (CS302) : Assignment # 01
Digital Logic Design (CS302) : Assignment # 01
Please carefully read the following instructions before attempting the assignment.
You should consult the recommended books to clarify your concepts as handouts are not
sufficient.
Topic Covered:
Number Systems
Logic Gates
Boolean Algebra
NOTE
No assignment will be accepted after the due date via email in any case (whether it is the
case of load shedding or internet malfunctioning etc.). Hence refrain from uploading
assignments in the last hour of the deadline. It is recommended to upload the solution file
at least two days before its closing date.
If you people find any mistake or confusion in the assignment (Question statement),
please consult with your instructor before the deadline. After the deadline, no queries
will be entertained in this regard.
Perform the following arithmetic operations on the given data. You can use indirect conversion
or repeated division methods only. Convert the result into Caveman Number System.
You must show all the steps of calculations and conversions involved. In the case of direct
results, major marks will be deducted.
Hint: Convert all numbers to Decimal Number System and then reconvert it to Caveman Number
System.
Solution
We are required to use the Indirect Method or Repeated Division methods only.
( 3476423 )O =¿
(11100111110100010011)₂ = (1 × 2¹⁹) + (1 × 2¹⁸) + (1 × 2¹⁷) + (0 × 2¹⁶) + (0 × 2¹⁵) +
(1 × 2¹⁴) + (1 × 2¹³) + (1 × 2¹²) + (1 × 2¹¹) + (1 × 2¹⁰) + (0 × 2⁹) + (1 × 2⁸) + (0 × 2⁷) +
(0 × 2⁶) + (0 × 2⁵) + (1 × 2⁴) + (0 × 2³) + (0 × 2²) + (1 × 2¹) + (1 × 2⁰) = (949523)₁₀
Hence
( 3476423 )O =¿
( ↑ ∆> ΣΩ )5 =( ↑ x 54 ) + ( ∆ x 53 ) + ( ¿ x 52 ) + ( Σ x 51 ) + ( Ω x 5 0 )=( 4 x 5 4 ) + ( 1 x 53 ) + ( 2 x 52 ) + ( 0 x 51 ) + ( 3 x 50 )= ( 4 x 625 )+ ( 1
Hence
( ↑ ∆> ΣΩ )5 =( 2678 )10
So finally,
( 6 F 4 DE 2 ) H + ( 3476423 )O−( 1011010101010101011101 )B + ( ↑ ∆> ΣΩ )5−( 9877693 ) D
5 460203
1
5 920406 - 1 = ∆
5 184081 - 1 = ∆
5 36816 - 1 = ∆
5 7363 - 1 = ∆
5 1472 - 3 = Ω
5 294 - 2 = >
5 58 - 4 = ↑
5 11 - 3 = Ω
2 - 1 = >∆
2 16664042
2 8332021 - 0
2 4166010 - 1
2 2083005 - 0
2 1041502 - 1
2 520751 - 0
2 260375 - 1
2 130187 - 1
2 65093 - 1
2 32546 - 1
2 16273 - 0
2 8136 - 1
2 4068 - 0
2 2034 - 0
2 1017 - 0
2 508 - 1
2 254 - 0
2 127 - 0
2 63 - 1
2 31 - 1
2 15 - 1
2 7 - 1
2 3 - 1
2 1 - 1
Binary 1 1 1 1 1 1 1 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 1 0
Number
↓
Gray Code 1 0 0 0 0 0 0 1 0 1 1 0 0 1 1 1 0 0 0 1 1 1 1 1
1
8480543
6
1
530033 - 15 = F
6
1
33127 - 1
6
1
2070 - 7
6
1
129 - 6
6
1
8 - 1
6
( 8480543 )¿ Coded Decimal =( 81671 F )¿Coded Hex
Find the equivalent Excess-7 code for the number ( 76372 )O
Excess-7 Number System
For an Excess-N-based number, we need to represent “X” codes for that we will use the binary
code for X+M.
As you already know, Excess-N = (2n-1-1), where n is the number of bits required to represent the
number. For Excess-7 Number System or Representation. We need:
2n−1−1=7
2n−1=7+ 1
2n−1=8
2n−1=2∗2∗2
2n−1=23
n−1=3
n=4
So, we will use 4 bits to represent the number.
VALU
SIGNED MAGNITUDE EXCESS-7
E
-9 ---- ----
-8 ---- ----
-7 1111 0000
-6 1110 0001
-5 1101 0010
-4 1100 0011
-3 1011 0100
-2 1010 0101
-1 1001 0110
0 1000 or 0000 0111
+1 0001 1000
+2 0010 1001
+3 0011 1010
+4 0100 1011
+5 0101 1100
+6 0110 1101
+7 0111 1110
+8 ---- 1111
As for a valid BCD (8421) number, we need to add 6 to make an invalid BCD into a Valid one.
Same as that, we will add 7 (0111) to make an invalid Excess-7 into a valid Excess-7 code.
We can represent numbers from -7 to +8 using an Excess-7 Number System. So, in such case, 9
will be presented as 1 0 = 0001 0000 in Excess-7 format.
Solution
We want to find the equivalent Excess-7 code for the number ( 76372 )O , First, we are required to
convert an Octal Number into a Decimal Number.
(76372)O = (7 × 8⁴) + (6 × 8³) + (3 × 8²) + (7 × 8¹) + (2 × 8⁰) = (31994)10
In term of a 4-bit number, we can rewrite the obtained Decimal Number as:
3 1 9 9 4
NORMAL BINARY CODE 0011 0001 1001 1001 0100
0111 0111 0111 0111 0111
To convert a normal number, we will add 7 (0111) to make it Excess-7 Number
EXCESS-7 NUMBER 1010 1000 0001 0000 0001 0000 1011