0% found this document useful (0 votes)
63 views

Questions No 01: Introduction To Computing (CS101) Total Marks 20

The document is a student assignment containing two questions regarding binary and boolean logic. It provides the steps to: 1) Convert two decimal numbers (4789 and -8735) to binary and back to decimal. 2) Use a truth table to solve a given boolean expression containing XOR, AND, and NOT operators.

Uploaded by

Anaya Malik
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)
63 views

Questions No 01: Introduction To Computing (CS101) Total Marks 20

The document is a student assignment containing two questions regarding binary and boolean logic. It provides the steps to: 1) Convert two decimal numbers (4789 and -8735) to binary and back to decimal. 2) Use a truth table to solve a given boolean expression containing XOR, AND, and NOT operators.

Uploaded by

Anaya Malik
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/ 3

Introduction to Computing (CS101)

Assignment # 01 Total marks = 20


Fall 2020

30 November 2020

Name: Laiqa Noor Student ID : bc200418594

Questions No 01 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.
 4789
 -8735

Answer:

4789

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

4789= ( 1001010110101)2

(1001010110101)₂ = (1 × 2¹²) + (0 × 2¹¹) + (0 × 2¹⁰) + (1 × 2⁹) + (0 × 2⁸) + (1 × 2⁷) + (0 × 2⁶) +


(1 × 2⁵) + (1 × 2⁴) + (0 × 2³) + (1 × 2²) + (0 × 2¹) + (1 × 2⁰)

= 4789

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

(10001000011111)2
(0010001000011111)2
(1101110111100000)2 2nd Complement
1101110111100000
1
(1101110111100001)2

(1101110111100001)₂ = -(1 × 2¹⁵) + (1 × 2¹⁴) + (0 × 2¹³) + (1 × 2¹²) + (1 × 2¹¹) + (1 × 2¹⁰) + (0 ×


2⁹) + (1 × 2⁸) + (1 × 2⁷) + (1 × 2⁶) + (1 × 2⁵) + (0 × 2⁴) + (0 × 2³) + (0 × 2²) + (0 × 2¹) + (1 × 2⁰)

= -8735

Questions No 02 Marks (10)

Solve the given Boolean Expression by using truth table.


( A ⊕ D ) . ( A+ B ) .(( B́+ Ć ) ⊕ ( B+C+ D ))

( A ⊕ D)
.
( B́+ Ć ) ( A ⊕ D) ( A+ B )
A B C D A⊕D A+ B ( B́+ Ć ) ( B+C+ D ) ⊕ . .
( B+C+ D ) ( A+ B ) ¿

( 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