0% found this document useful (0 votes)
45 views4 pages

CS101 Assignment No. 1 Student Name: Rohan Sajjad Student ID: 200408438

The document contains a student's solutions to two questions from their CS101 assignment. The first question involves converting decimal numbers to binary and back. The second asks to solve a Boolean expression using a truth table.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views4 pages

CS101 Assignment No. 1 Student Name: Rohan Sajjad Student ID: 200408438

The document contains a student's solutions to two questions from their CS101 assignment. The first question involves converting decimal numbers to binary and back. The second asks to solve a Boolean expression using a truth table.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

CS101 Assignment No.

1
Student Name : Rohan Sajjad
Student ID : 200408438

Question No. 1
Convert the following decimal numbers into equivalent binary numbers and then convert the binary
answer back into equivalent decimal. Show all the steps of conversions.
• 4789
• -8735

Solution:

 4789

2 4789 1
2 2394 0
2 1197 1
2 598 0
2 299 1
2 149 1
2 74 0
2 37 1
2 18 0
2 9 1
2 4 0
2 2 0
2 0 1

4789 10010101101012
(1001010110101)2              1 212 0 211 0 210 1 29 0 28 1
27 0 26
           1 25 1 24 0 23 1 22 0 21 1 20

(1001010110101)2 4096 0 0 512 0 128 0 32 16 0 4 0 1   




1001010110101 47892 
 -8735

2 8735 1
2 4367 1
2 2183 1
2 1091 1
2 545 1
2 272 0
2 136 0
2 68 0
2 34 0
2 17 1
2 8 0
2 4 0
2 2 0
2 0 1

10001000011111
Extend Binary sequence

0010001 00011111
0

Now 2’s compliment

1101110 11100000
1
Add 1
1101110 11100000
1
1
1101110 11100001
1

8735110111011110 000 12

11011101111000012                1 2 1 21514 0 2 1 2 1 2 1
213 1211 10
0 2 1 29 8

               1 2 1 2 1 2 0 2 0 27 6 5 4 3
02
0212 2 1 0

11011101111000012 32768 16384 0 4096 2048 10    24 0 256


128 64   

     32 0 0 0 0 1
11011101111000012 8735

Question No. 2

Solve the given Boolean Expression by using truth table.


(𝑨 ⊕ 𝑫). (𝑨 + 𝑩). ((𝑩̅ + 𝑪̅) ⊕ (𝑩 + 𝑪 + 𝑫))

(𝑨 ⊕ 𝑫)
.
(𝑩̅ + 𝑪̅) (𝑨 ⊕ 𝑫) (𝑨 + 𝑩)
A B C D 𝑨⊕𝑫 𝑨+𝑩 (𝑩̅ + 𝑪̅) (𝑩 + 𝑪 + 𝑫) ⊕ . .
(𝑩 + 𝑪 + 𝑫) (𝑨 + 𝑩) ((𝑩̅ + 𝑪̅)

(𝑩 + 𝑪 + 𝑫))
0 0 0 0 0 0 1 0 1 0 0
0 0 0 1 1 0 1 1 0 0 0
0 0 1 0 0 0 1 1 0 0 0
0 0 1 1 1 0 1 1 0 0 0
0 1 0 0 0 1 1 1 0 0 0
0 1 0 1 1 1 1 1 0 1 0
0 1 1 0 0 1 0 1 1 0 0
0 1 1 1 1 1 0 1 1 1 1
1 0 0 0 1 1 1 0 1 1 1
1 0 0 1 0 1 1 1 0 0 0
1 0 1 0 1 1 1 1 0 1 0
1 0 1 1 0 1 1 1 0 0 0
1 1 0 0 1 1 1 1 0 1 0
1 1 0 1 0 1 1 1 0 0 0
1 1 1 0 1 1 0 1 1 1 1
1 1 1 1 0 1 0 1 1 0 0

You might also like