Professional Documents
Culture Documents
CODE : BBIT/2019/51296
Question one
With those steps one is able to convert the octal into a hexadecimal
number.
b) Determine the decimal equivalent of the binary number (1010.011) 2
(4marks)
1 0 1 0 . 0 1 1
23 22 21 20 . 20 2-1 2-2
0.2 * 0 = 0
1.2 * 1 = 2
0.2 * 2 = 0
1.2 * 3 = 8
________________
0 + 2 + 0 + 8 = 10
________________
10 + (.011)2
10 + 0.0 +0.25 +0.125
Answer = 10.375
c) Convert hexadecimal number, 4.BF85 into equivalent octal number (3
marks)
Hex to Octo Table
HEX OCTO
4 4
B 13
F 17
8 10
5 5
(4.BF85)16 = (4.577024)8
5264 / 2 0
2812 / 2 1
1406 / 2 0
703 / 2 1
351 / 2 0
175 / 2 1
87 / 2 0
43 / 2 1
21 / 2 1
10 / 2 0
5/2 1
2/2 0
1/2 0
Octal number = 5 2 6 4
Binary = 101010110100
74 / 2 37 0
Binary = 1001010
37 / 2 18 1
18 / 2 9 0
f) How many bits would be
9/2 4 1
required to encode decimal
4/2 2 0 numbers 0 to 9999 in
2/2 1 0
straight binary and BCD
1/2 1 1 codes? What would be the
BCD equivalent of decimal 27 in 16-bit representation? (3mrks)
The Number of bits required to encode is by Total number of decimals to
be represented = 10000 = 10 4 = 2n (where n is the number of bits required)
= 213.29. Therefore, the number of bits required for straight binary encoding
= 14.
g) State three applications of the Gray code (3mrks)
Gray codes have application in ADC(Analog to Digital Converter) designing,
they are used to encode the position of a motor.
This code also finds application in K-Map(If you are familiar with it),
which can be used to reduce boolean expressions.
3 6 7
+3 +3 +3
=6 =9 =10
0110 1001 1010
Therefore (367)10=(011010011010)XS3
k) Give the steps for which any Gray code can be converted into an
equivalent binary number (3mrks)
Steps with Example
Example − Convert Gray code 100111 into Binary number.
Steps
b5=g5=1=1
b4=g5⊕g4 =1⊕0 =1
b3=b4⊕g3 =1⊕0 =1
b2=b3⊕g2 =1⊕1 =0
b1=b2⊕g1 =0⊕1 =1
b0=b1⊕g0 =1⊕1 =0
So, Binary number will be 111010.
l) Describe a two input AND gate, giving its truth table (4mrks)
Input Output
0 0 0
0 1 0
1 0 0
1 1 1