Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

National University of Computer & Emerging Sciences

Computer Logic & Design – TC&TD – Fall 2006


Quiz-1A
Solution
Answer the following questions only in the provided space Time allowed: 30 min
Use back of the page for rough work – no opening of notebooks or texts! Maximum points: 35

1. What are the two distinguishing characteristics of digital systems (compared to analog)? 2 pts

Digital systems have discrete values while analog systems have continuous. Digital systems carry

binary values 0 or 1, while analog systems have random values.

2. What is an ADC used for? Give an example. 2 pts

Analog to Digital Converter is used to convert analog signal to digital signal for processing.

As an example quote any device which converts analog signal to digital.

3. What is the binary equivalent of (0.425)10 evaluated to the 3rd binary bit? 2 pts

0.425 * 2 = 0.85, 0.85 * 2 = 1.70, 0.7 * 2 = 1.40


The answer is 0.011 to 3rd binary bit

4. Determine the 2’s complement of negative (43A)16 in binary form. Assume # is 12 bit long 3 pts

(43A) 16 = (010000111010)2 therefore - (43A) 16 = (101111000110)2 (2’s Complement)


The answer is 010000111010

5. Determine the decimal value of (111010)2 (2’s complement form)? 2 pts


The number is negative since the MSB is one and the number is in 2’s Complement.
Taking the 2’s Complement we get (000110)2 = (6)10. But the original number is
negative so the answer is -6

6. Express 0.1100011 x 2-81 as a Single Precision Floating Point binary # per IEEE 754 format. 2 pts
This is a positive number, therefore sign bit is 0. Arranging the number in standard
format, we get 1.100011 x 2-82. Exponent is equal to 127-82=45. (45)10 = (00101101)2.
The number is 0|00101101|10001100000000000000000

7. Perform the following calculation using 2’s complement arithmetic. 2 pts


Hint: complement the number first.
0 1 0 1 1 1 0 0 (2’s complement form)
- 0 0 1 0 1 0 0 1 (2’s complement form)
First take the complement of the second number
1 1 0 1 0 1 1 1 now add this with the first
+ 0 1 0 1 1 1 0 0

1 0 0 1 1 0 0 1 1 discard the carry


8. Multiply 4-bit 2’s complement #s (0110)2 with (1101)2 using 2’s complement arithmetic. 3 pts
First we note the answer will be negative. Since its easier to work with less bits, we
take 2’s Complement of the multiplier (1101)2 = (0011)2 = (3)10
0110 6
x 0011 x -3
0110 -18
+ 0110
010010
Now taking the 2’c Complement of the answer we get 101110.

9. For a 7-bit 2’s complement form, what is the range of integer numbers that can be represented? 2pts
Range for a n-bit signed number is given by -2n-1 to +2n-1-1
So n=7 we get -27-1 to +27-1-1 = -64 to +63

10. Perform the following operation on the two octal numbers: 2 pts

7 6 0 2
- 1 7 7 4
5 6 0 6
Alternate method: First take the 2’s Complement of the number (1774)8
7777-1774+1 = (6004)8
Now add the first number in the 2’s Complement of the second number.
7602
+6004
15606 discard carry

11. Perform the following subtraction 2 pts

(9 2 B 5) 16
- (0 2 A C) 16
9 0 0 9
Alternate method: First take the 2’s Complement of the number (02AC)16
FFFF-02AC+1 = (FD54)16
Now add the first number in the 2’s Complement of the second number.
92B5
+FD54
19009 discard carry

12. Perform the following BCD addition showing all steps. 2 pts

0 1 1 0 0 1 1 1

+ 0 1 0 1 1 0 0 0
1 0 1 1 1 1 1 1
1 0 1 1 0 adding 6 because
Number is > 9
1 1 0 0 0 1 0 1
0 1 1 0 adding 6 because number >9
1 0 0 1 0 0 1 0 1 Answer = 125
13. In an 8-bit digital system being considered, a designer is facing constraints in allocating an additional bit for
even parity in his design. However, he knows realistically for all his inputs, the 8th MSB bit will never be
used in the given system. So, he decides to implement the unused 8th bit as even parity bit. Can you help him
determine the parity bit for the following set of inputs: 2 pts
0 1 0 1 0 1 1 0

1 0 1 1 1 0 1 1

In the above system, will the designer be able to detect double digit errors? Why? 2 pts

No, parity of such number remains same so we can’t detect any errors

14. What is an ASCII code? 2 pts

ASCII stands for American Standard Code for Information Interchange. They are used for representing

alphanumeric and special characters.

15. Which of the following are weighted codes? 3 pts


BCD Code √
ASCII Code X
Gray Code X

You might also like