0% found this document useful (0 votes)
15 views

Assignment 2

DLD Assignment 2 GIKI

Uploaded by

danishahmed3232
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Assignment 2

DLD Assignment 2 GIKI

Uploaded by

danishahmed3232
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Assignment # 2 Digital Logic Design (CE 221-B/F)

Instructor: Dr Adnan Shah Issue Date: 30th September 2024


Total Marks: 100 Due Date: 7th October 2024

Multiple Choice Questions: [16 POINTS]


1. When performing binary addition using the 2's complement method, an
overflow is indicated by a(n)
A) incorrect sign bit B) incorrect polarity C) negative sign
D) incorrect sum

2. The greatest single-digit value in the octal number system equals


A) 9 B) 8 C) 1 D) 7

3. The highest single-digit value in the hexadecimal number system equals


A) 8 B) 15 C) 0 D) 4

4. Convert 11001010001101012 to hexadecimal.


A) CA35 B) 53AC1 C) 530121 D) 121035

5. Convert 8B3F16 to binary.


A) 1000101100111111 B) 011010 C) 1011001111100011
D) 35647

6. Which of the following is an invalid BCD code?


A) 0101 B) 1101 C) 1001 D) 0011

7. Convert decimal 59.72 to BCD.


A) 01011001.01110010 B) 1110.11 C) 0101100101110010
D) 111011

8. Which of the following is not a standard digital code?


A) Gray B) ASCII C) BCD D) ARRL

9. Which of the following statements accurately describes the Gray code?


A) It exhibits only a single-bit change from one value to the next.
B) It is not an arithmetic code. C) It is used primarily for shaft position
encoding.
D) All of these statements accurately describe the Gray code.

10. Which of the following is the most widely used code for computer input and
output?
A) parity B) Gray C) EBCDIC D) ASCII

11. What is the BCD form of 438 in odd parity?


A) 0100000110100 B) 1010000111000 C) 0100001110001
D) 1000001101000

12. What is the BCD form of 735 in even parity?


A) 0111001101011 B) 1010100110111 C) 0101001101110
D) 0011100110101

13. Which of the following is based on the division of two binary numbers?
A) The cyclic redundancy check (CRC) B) Gray code to decimal
conversion C) Hamming code conversion D) ASCII decoding

14. The Hamming code is a(n) ________.


A) error correction code B) an updated version of the ASCII code
C) encryption code D) octal version of the BCD code

15. The code that has an even-parity error is


A) 1010011 B) 1101000 C) 1001000 D) 1110111
+
16. In the cyclic redundancy check, the absence of errors is indicated by
A) Remainder = generator code B) Remainder = 0
C) Remainder = 1 D) Quotient = 0

Problem Solving 2: [68 POINTS]


1. [4] What is the range of numbers which can be represented by 9 bits if we
are representing two’s complement integers? (express as the formula and
as decimal numbers)

2. [12] Consider the following two sequences of 8 bits: x = 10101011 y =


01001000

a) If a two’s complement signed number representation is being used,


what number is represented by each of the above bit sequences? Give
your answer in ordinary decimal with a ± sign. Show the hand-
calculations used to determine the answer.

b) Compute the sum x + y by hand in binary. Both inputs and the result
should be interpreted in 8-bit, two’s complement signed number
representation. Check your result in decimal. Is there an overflow?
Explain how you know

c) Compute the the difference x − y by hand in binary. Both inputs and


the result should be interpreted in 8-bit, two’s complement signed
number representation. Check your result in decimal. Is there an
overflow? Explain how you know.

3. [6] Convert decimal 6,514 to both BCD and ASCII codes. For ASCII, an
even parity bit is to be appended at the left.

4. [4] Represent the unsigned decimal numbers 791 and 658 in BCD, and
then show the steps necessary to form their sum.

5. [6] Represent the decimal number 6,248 in (a) BCD, (b) excess‐3 code,
(c) 2421 code

6. [6] Convert each binary number to Gray code:


(a) 11011 (b) 1001010 (c) 1111011101110

7. [6] Apply modulo-2 to the following:


(a) 1100 + 1011 (b) 1111 + 0100 (c) 10011001 + 100011100

8. [6] The following is a string of ASCII characters whose bit patterns have
been converted into hexadecimal for compactness: 73 F4 E5 76 E5 4A
EF 62 73. Of the eight bits in each pair of digits, the leftmost is a parity
bit. The remaining bits are the ASCII code.
(a) [4] Convert the string to bit form and decode the ASCII.
(b) [2] Determine the parity used: odd or even?

9. [2] What bit must be complemented to change an ASCII letter from capital
to lowercase and vice versa?

10. [12] The state of a 12-bit register is 100010010111. What is its content if
it represents
(a) Three decimal digits in BCD?
(b) Three decimal digits in the excess-3 code?
(c) Three decimal digits in the 8421 code?
(d) A binary number?

11. [8] Apply CRC to the data bits 10110010 using the generator code 1010
to produce the transmitted CRC code.
12. [6] By means of a timing diagram, show the signals of the outputs f and g
in following Figure as functions of the three inputs a, b, and c. Use all
eight possible combinations of a, b, and c.

13. [6] By means of a timing diagram, show the signals of the outputs f and g
in following Figure as functions of the two inputs a and b. Use all four
possible combinations of a and b.

Good Luck

You might also like