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

Assignment No.

01 (Graded) Total Marks: 20


Semester Fall 2018
Due Date: 21-11-2018
CS101- Introduction to Computing

Name : Muhammad Bilal Tahir

Roll No. Bc180400644

Question#1: [Marks 10]

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.

 3242

Solution: First I convert decimal number into binary number.

2 3242
2 1621 - 0
2 810 - 1 The answer is = (110010101010)2
2 405 - 0
2 202 - 1
2 101 - 0
2 50 - 1
2 25 - 0
2 12 - 1
2 6 -0
2 3 -0
1 -1

Now I’m going to convert the binary answer back into Decimal.
(110010101010)2

= 1*211 + 1*210 + 0*29 + 0*28 + 1*27 + 0*26 + 1*25 + 0*24 + 1*23 + 0*22
+ 1*21 + 0*20

= 1*2048 + 1*1024 + 0*512 + 0*256 + 1*128 + 0*64 + 1*32 + 0*16


+ 1*8 + 0*4 + 1*2 + 0*1

= 2048 + 1024 + 0 + 0 + 128 + 0 + 32 + 0 + 8 + 0 + 2 + 0


= 2048 + 1024 + 128 + 32 + 8 + 2
=

The answer is = (3242)10

Question#2:
[Marks 10]
Solve the given Boolean Expression by using truth table.
(AB) . ((A/ + C/)  (A/+B))
(Here . is for And Sign)
Solution:
A B C AB A/ C/ (A/ + C/) (A/+B) (A/ + C/)  (AB).((A/ + C/)
(A/+B)  (A/+B))

0 0 0 0 1 1 1 1 0 0
0 0 1 0 1 0 1 1 0 0
0 1 0 1 1 1 1 1 0 0
0 1 1 1 1 0 1 1 0 0
1 0 0 1 0 1 1 0 1 1
1 0 1 1 0 0 0 0 0 0
1 1 0 0 0 1 1 1 0 0
1 1 1 0 0 0 0 1 1 0

You might also like