cs302 solution

No Comments
CS302- Digital Logic Design
Assignment # 1
Spring 2010

Question_1: [marks: 4]
Convert each decimal fraction to binary using repeated-multiplication-by-2:
  • 0.98

0.98 .98*2=1.96 .96*2=1.92 .92*2=1.84 .84*2=1.68 .68*2= 1.36 .36*2=0.72 .72*2=1.44 .44*2=0.88 .88*2=1.76 .76*2=1.52 .52*2=1.04 .04*2=0.08 .08*2=.16
keep going and you finally get
.11111010111000010100011
  • 0.60

  • 60 .6*2=1.2 .2*2=0.4 .4*2=0.8 .8*2=1.6 this is a repeating decimal .10011001100110011000.60

Question_2: [marks: 6]
Express each decimal number as an 8-bit number in the 2's complement form:
  • +10
  • +10 10/2=5 rem 0 5/2=2 rem 1 2/2= 1 rem 0 1/2 = 0 rem 1 = 1010 make 8 bits 00001010

  • -125
-125 125/2=62 rem 1 62/2=31 rem 0 31/2 = 15 rem 1 15/2=7 rem 1 7/2=3 rem 1 3/2=1rem 1 1/2 = 0 rem 1 = 1111101 make 8 bits 01111101 change to negative
  • flip bits 10000010
    add 1 +1
    10000011

Question_3: [marks: 4]
Represent the following decimal numbers in BCD:
  • 919
% no rem
2 919
2 459 1
2 229 1
2 114 1
2 57 0
2 28 1
2 14 0
2 7 0
2 3 1
2 1 1
So we get (1110010111)2=397 in BCD
Ans=397
  • 321

% no rem
2 321
2 160 1
2 80 0
2 40 0
2 20 0
2 10 0
2 5 0
2 2 1
2 1 0
So we get (101000001)2= A1 in BCD
ANS; A1
Question_4: [marks: 4]
What is the highest decimal number that can be represented by each of the following numbers of binary digits (bits) ?
Digits No. Binary digits
two = 2 0010
five = 5 0101
nine= 9 1001
ten = 10 1010
So ten = 10 1010 is the highest no.

Question_5: [marks: 2]
Which input combination will produce logic 1 at the output of a 4-input NOR gate ?

The NOR gate is a digital logic gate that implements logical NOR - it behaves A HIGH output (1) results if both the inputs to the gate are LOW (0).. NOR is a functionally complete operation—combinations of NOR gates can be combined to generate any other logical function. By contrast, the OR operator is monotonicas it can only change LOW to HIGH but not vice versa.
IN PUTS OUT PUT
A B C D O/P
0 0 0 0 1
So we will get high 1 only when all inputs are zero.

Next PostNewer Post Previous PostOlder Post Home

0 comments

Post a Comment