DLD 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Digital Logic Designing

NAME = MUHAMMAD ALI

DEPARTMENT = COMPUTER SCIENCE

SEMESTER = 2nd

INSTRUCTOR= Dr. Mohsin Raza

CMS ID = 391705
Answer:
Decimal Binary Octal Hexadecimal
757.25 1011110101.010 1365.2 2F5.4
1437.75 10110011101.11 2635.6 59D.C
3761.375 111010110001.011 7261.3 EB1.6
64206.6875 1111101011001110.1011 175316.54 FACE.B

Answer:
a) (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G, H, I, J) where A = 10, B = 11, C = 12, D =
13, E = 14, F = 15, G = 16, H = 17, I = 18, J = 19.
b) Conversion of (2011) from base 10 to base 20 = (𝟓𝟎)𝟐𝟎
c) Conversion of (BEE.1) from base 20 to base 10 = (𝟒𝟔𝟗𝟒. 𝟎𝟓)10

Answer:
X = (761)8 Y = (2205)6

a. X-Y in 2’s compliment:


X = (111110001)2
Y = (111111101)2
X – Y = (110100)2

b. Conversion of (110100) from base 2 to base 12 = (44) 12

• In 10-bits:
(110100)2 => (52)10
• In signed 2’s Complement:
(110100)2
• In signed 1’s Complement:
(001011)1

Answer:
X= Y=
X = -0111010 Y = 01000001
X = 10111010 Y=
Answer:

a. 01001 - 11010 = (−10001)2. In Decimal (−17)10.

b. 11010 - 11001 = (000001)2. In Decimal (−1)10.

Answer:
X = (+458)10
Y = (-480)10
X + Y = 458 – 480

1. Take 10’s Complement for 480

Note: 10’s Complement of a number is 1 added to its 9’s complement number.

Step 01: 9’s Complement of 480 is obtained by subtracting each digit from 9.
999 − 480 = 519
Step 02: Now add 1 to the 9’s Complement to obtain 10’s Complement,
519 + 1 = 520.

2. Add 458 and 520 using BCD addition.


Steps for BCD Addition:
 Add each digit of A and B using binary addition.
 If sum of two digits is more than 9 then result is Invalid BCD and add 6 to the
result, Otherwise result is valid BCD.
 If carry, then add it to the next bits.
BCD code for 480: 0100 1000 0000
BCD code for 520: 0101 0010 0000
________________________________________________
Addition: 10000 0000 0000
BCD value: 10 0 0
So final answer of BCD addition is 1000.

Answer:
a. (-118.625)10 is represented in signed-2’s complement fixed point format as
(000010010010)2
b. The three elements that make up the number's 32-bit single precision IEEE 754
binary floating point representation:
Sign (1 bit) = 1 (a negative number)
Exponent (8 bits) = 1000 0101
Mantissa (23 bits) = 110 1101 0100 0000 0000 0000
Hence,
-118.625 in single-precision (32-bits) floating point is (1100 0010 1110 1101 0100
0000 0000 0000).
c. (-118.625) is represented in signed Binary Coded Decimal (BCD) as (1001 0001
1000.0110 0010 0101)BCD

1. Registration Number: 391705


8-Bit code: (00110011 00111001 00110001 00110111 00110000 00110101)

2. Name: Muhammad Ali


8-Bit code: (01001101 01110101 01101000 01100001 01101101 01101101
01100001 01100100
00100000 01000001 01101100 01101001)
3. Course: Digital Logic Designing
8-Bit code: 01000100 01101001 01100111 01101001 01110100 01100001
01101100 00100000 01001100 01101111 01100111 01101001 01100011
00100000 01000100 01100101 01110011 01101001 01100111 01101110
01101001 01101110 01100111

4. Contact Number: 03448135236


8-Bit code: 00110000 00110011 00110100 00110100 00111000 00110001
00110011 00110101 00110010 00110011 00110110
5. Email Address: [email protected]
8-Bit code: 01101101 01110101 01101000 01100001 01101101 01100010
01100001 01101100 01101111 01110011 01101000 01000000 01100111
01101101 01100001 01101001 01101100 00101110 01100011 01101111
01101101
6. Permanent Address: Kasi Road, Quetta, Balochistan
8-Bit code: 01001011 01100001 01110011 01101001 00100000 01010010
01101111 01100001 01100100 00101100 00100000 01010001 01110101
01100101 01110100 01110100 01100001 00101100 00100000 01000010
01100001 01101100 01101111 01100011 01101000 01101001 01110011
01110100 01100001 01101110
Solution:

Timing Diagram of OR Gate with three inputs (A,B,C):

A= 0 1 0 1 0 1 0 1

B= 0 0 1 1 0 0 1 1

C= 0 0 0 0 1 1 1 1

F= 0 1 1 1 1 1 1 1

Timing Diagram of NAND Gate with three inputs (A,B,C):

A= 0 1 0 1 0 1 0 1

B= 0 0 1 1 0 0 1 1

C= 0 0 0 0 1 1 1 1

G= 1 1 1 1 1 11 0

You might also like