Sunteți pe pagina 1din 4

Assignment # 1

Solution

Q1. What is the main limitation to the use of digital techniques?


Ans. Real world physical quantities are analog. e.g. length, volume, area, time, sound etc.

Q2. The following is a string of ASCII characters whose bit patterns have been converted into
hexadecimal for compactness:

(4A EF 6E 20 C4 EF E5)16
Of the 8 bits in each pair of digits, the left most is a parity bit. The remaining bits are ASCII code.
(a) Convert to binary form and decode the ASCII.
Ans. Binary Form:
01001010 11101111 01101110 00100000 11000100 11101111 11100101
Characters:
J o n Space D o e

(b) Determine the parity used:


Ans. Odd.

Q3. Represent decimal digit 6027 in:


(a) 8421 Form:
Ans. 0110 0000 0010 0111

(b) 4221 Form:


Ans. 1010 0000 0010 1011

(c) 2421 Form:


Ans. 1100 0000 0010 1101

Q4. If (10n01) 2 = 33 r, find n and r.


Ans.
(24 *1)  (23 *0)  (22 * n)  (21 *0)  (20 *1) = (r1 *3)  (r 0 *3)
14  4n  3r
Since “n” is in base 2.So there exist two possibilities. Either “n” can be 0 or 1.
Case 1: If n = 0
14+0 = 3r
14 = 3r
r = 14/3 (Not True)

Case 2: If n = 1
14 + 4 = 3r
18 = 3r
r = 6 (True)
Answer is n = 1, r=6.
Q5. 8 digit hexadecimal number contains 5 integer digits and 3 fractional digits. Find the Maximum
decimal number it can represent and minimum non-zero decimal number it can represent.
Ans.
Maximum decimal number that can be represented = (2 20 – 1) + (1 – 1/2 12)
= 2 20 – 2 -12 (1048576)10

Minimum non-zero decimal number that can be represented = 2 -12(0.000244)10

Q6. For the value F870000, if this represents a two’s complement integer, what decimal value is
being represented?
Ans.
F870000 = 1111 1000 0111 1000 0000 0000 0000 0000
= (-231 * 1)+ (230 * 1) + (229 * 1)+ (228 * 1) + (227 *1)+ (222 *1)+ (221 *1) +(220 *1) +(219 *1)
= (-126353408)10

Q7. Express the following irrational numbers in the binary system with enough digits in the
fractional part so that the accuracy is to no less than four decimal places in the decimal equivalent.
(a) pi = (3.1429)10
Ans. (11.0010)2

(b) √15 = (3.8730)10


Ans. (11.1101)2

(c ) Base of natural logarithms e = (2.7183)10


Ans. (10.1011)2

Q8. What is the largest BCD encoded decimal value that can be represented in three bytes?
Ans. 3 bytes = 24 bits. Since BCD is a 4-bit code, thus 3 bytes code convert to 24/4 = 6 decimal digits.
Range of BCD code is: 0 – 9.
Thus the largest BCD encoded decimal value is 999999.

Q9. Why can’t the parity method detect a double error in the transmitted data?
Ans. Two errors in the data would not change the oddness or evenness of the number of 1s in the data.

Q10. A small process-control computer uses octal codes to represent its 12-bit memory addresses:
(a) How many octal digits are required?
Ans. Since 3 bits convert to a single octal digit, thus 12/3 = 4 octal digits.

(b)What is a range of addresses in octal?


Ans. Binary = (000000000000)2 – (111111111111)2
Octal = (0000)8 – (7777)8
(c ) How many memory locations are there?
Ans. With 4 octal digits, there are 84 = 4096 memory locations in total.
Q11. Computers often communicate with other remote computers over the telephone lines. e.g this
is how communication over the internet takes place. When one computer is transmitting a message
to another, the information is usually encoded in ASCII. What actual would a computer transmit to
send the message HELLO using ASCII with Even Parity?
Ans.
H= 0 1 0 0 1 0 0 0

E=
1 1 0 0 0 1 0 1
L=
1 1 0 0 1 1 0 0
L=
1 1 0 0 1 1 0 0
O=
1 1 0 0 1 1 1 1

Q12. Convert the following:


(a) (2AC5.D)16 = (10949.8125)10, (10101011000101.1101)2, (25305.64)8
(b) (343.24)10 = (2333.11)5
(c ) (0.908)10 = (0.11101000011)2
(d) (1111011101110)2 = (1000110011001)GC
(e) (11000010001)GC = (10000011110)2
(f) (100101010011.0101)BCD = (1110111001.1)2

Q13. Determine the single error correcting code for the following BCD numbers using even parity.
(a) 0101
Ans. 4 message bits, 3 parity bits. Total = 7 Bit Code.

Bit Designation P1 P2 M1 P3 M2 M3 M4
Bit Position 1 2 3 4 5 6 7
Binary Position 001 010 011 100 101 110 111
Information Bits 0 1 0 1
Parity Bits 0 1 0
Code = 0100101

(b) 0011
Ans. 4 message bits, 3 parity bits. Total = 7 Bit Code.

Bit Designation P1 P2 M1 P3 M2 M3 M4
Bit Position 1 2 3 4 5 6 7
Binary Position 001 010 011 100 101 110 111
Information Bits 0 0 1 1
Parity Bits 1 0 0
Code = 1000011
Q14. Determine the single error correcting code for the following information code 10101 for odd
parity.
Ans. 5 message bits, 4 parity bits. Total = 9 Bit Code.

Bit Designation P1 P2 M1 P3 M2 M3 M4 P4 M5
Bit Position 1 2 3 4 5 6 7 8 9
Binary Position 0001 0010 0011 0100 0101 0110 0111 1000 1001
Information Bits 1 0 1 0 1
Parity Bits 0 0 1 1
Code = 001101011

Q15. 8-bit character 10101111 is to be encoded using odd parity Hamming code. What is the bit
string that will be transmitted?

Ans. 8 message bits, 4 parity bits. Total = 12 Bit Code.

Bit Designation P1 P2 M1 P3 M2 M3 M4 P4 M5 M6 M7 M8
Bit Position 1 2 3 4 5 6 7 8 9 10 11 12
Binary Position 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100
Information Bits 1 0 1 0 1 1 1 1
Parity Bits 0 1 1 1
Code = 011101011111

Q16. (a)Obtain a 7 bit Composite Code word for the data word: 0010.
Ans. 4 message bits, 3 parity bits. Total = 7 Bit Code.

Bit Designation P1 P2 M1 P3 M2 M3 M4
Bit Position 1 2 3 4 5 6 7
Binary Position 001 010 011 100 101 110 111
Information Bits 0 0 1 0
Parity Bits 0 1 1
Code = 0101010

(b) Evaluate three Check Bits assuming no error.


Ans.
Bit Designation P1 P2 M1 P3 M2 M3 M4
Bit Position 1 2 3 4 5 6 7
Binary Position 001 010 011 100 101 110 111
Received Code 0 1 0 1 0 1 0

C1= XOR(1,3,5,7) = 0  0  0  0  0
C2= XOR(2,3,6,7) = 1  0  1  0  0
C3= XOR(4,5,6,7) = 1  0  1  0  0

(c ) Correct the code if there are any errors.


Ans. For Even Parity: All Good Checks. No error.
For Odd Parity: All Bad Checks. Error in bit position 7.
Correct Code = 0101011

S-ar putea să vă placă și