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

CF_MidtermQuestion Question Solving Class

Uploaded by

samir241-15-361
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

CF_MidtermQuestion Question Solving Class

Uploaded by

samir241-15-361
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Computer Fundamental

Question Solving Class

Join our community-

Click Here Click Here Click Here

1
Fall-23

Conversion
1. Decimal to Others
2. Others to Decimal
3. Others to Others

Decimal to Others
(---)₂ = (---)ₓ
(19.35)₁₀ = (?)₂
(19.35)₁₀ = (10011.0101)₂

2 19 Remainder 2 x .35
.70 0
2 9 - 1
2 x .70
2 4 - 1 1.40 1

2 2 - 0 2 x .40
.80 0
2 1 - 0
2 x .80
2 0 - 1 1.60 1

2
Fall-23

Conversion
1. Decimal to Others
2. Others to Decimal
3. Others to Others

Decimal to Others
(---)₁₀ = (---)ₓ
(19.35)₁₀ = (?)₈
(19.35)₁₀ = (23.26)₈

8 19 Remainder 8 x .35
2.80 2
8 2 - 3
8 x .80
2 0 - 2 6.40 6

3
Fall-23

Conversion
Others to Decimal
(---)ₓ = (---)₁₀

(1101.01)₂ = (?)₁₀

(1101.01)₂ = 1x2³ + 1x2² +0x2¹ +1x2⁰ +0x2⁻¹ +1x2⁻²

=1x8 + 1x4 +0x2 +1x1 +0x(1/2) +1x(1/4)

=8 + 4 +0 +1 +0 +(1/4)

=13.25

(1101.01)₂ = (13.25)₁₀

4
Fall-23

Conversion
Others to Decimal
(---)ₓ = (---)₁₀

(17.4)₈ = (?)₁₀

(17.4)₈ = 1x8¹ + 7x8⁰ + 4x8⁻¹

=1x8 + 7x1 +4/8

=8 + 7 + 4/8

=15.5

(17.4)₈ = (15.5)₁₀

5
Fall-23

Conversion
Others to Decimal
(---)ₓ = (---)₁₀

(A7.C)₁₆ = (?)₁₀

(A7.C)₁₆ = Ax16¹ +7x 16⁰ +Cx 16⁻¹

=10x16¹ +7x 16⁰ +12x 16⁻¹

=10x16 +7x 1 +12/16

=160 +7 +12/16

=167.75

(A7.C)₁₆ = (167.75)₁₀

6
Fall-23

Conversion
Others to Others
(---)ₓ = (---)ᵧ

1)Others(x) to Decimal
2)Decimal to Others(y)

7
Fall-23

a)Perform the following number conversion:

i.(132)₄=(?)₆
ii. (A7B)₁₆=(?)₈

i.(132)₄=(?)₆

Solution:
(132)₄=(?)₁₀
(?)₁₀=(?)₆

(132)₄ = 1x4^2 + 3x4^1 + 2x4^0


=1x16+ 3x4 +2
=16+ 12 +2
=30

(132)₄=(30)₁₀

8
Fall-23

(30)₁₀=(?)₆

6 30 Remainder

6 5 - 0

0 - 5

(30)₁₀=(50)₆

(132)₄=(50)₆

9
Fall-23

a)Perform the following number conversion:

ii. (A7B)₁₆=(?)₈

(A7B)₁₆=(?)₁₀
(?)₁₀=(?)ₐ

(A7B)₁₆= Ax16²+7x 16¹ +Bx 16⁰

=10x16²+7x 16¹ +11x 16⁰

=10x256 +7x 16 +11

=2560 +112 +11

=2683

(A7B)₁₆=(2683)₁₀
10
Fall-23

(A7B)₁₆=(2383)₁₀
(2383)₁₀=(?)₈

8 2683 Remainder

8 335 - 3

8 41 - 7

8 5 - 1

8 0 - 5

(A7B)₁₆=(2683)₁₀
(2683)₁₀=(5173)₈

11
Fall-23

b)
i. Unlike humans, computers do not perform subtraction directly, instead, they utilize an additive method.
Now demonstrate this by subtracting (-41) from (80) using the additive approach.

ii.(10101111)₂ / (110)₂

iii. (11010111)₂ x (1111)₂

12
Spring-23

Rules:

0+0=0
0+1=1
1+0=1
1 + 1 = 0 ;carry=1
1 + 1 + 1 = 1 ;carry=1

Example: 100111 + 11011

1 1 1 1 1 Carry

1 0 0 1 1 1

1 1 0 1 1

1 0 0 0 0 1 0 Sum

13
Fall-23

b)
i. Unlike humans, computers do not perform subtraction directly, instead, they utilize an additive method.
Now demonstrate this by subtracting (-41) from (80) using the additive approach.

Solution:
80 – (- 41)
80 + ( 41)

80 = 0101 0000
41 = 0010 1001

80 = 0101 0000
41 = 0010 1001
0111 1001

14
Fall-23

ii.(10101111)₂ / (110)₂

15
Fall-23

iii. (11010111)₂ x (1111)₂

16
Fall-23

c) How will you represent -29.55 x 2⁻³ in using IEEE 754 binary 32 bit format?

Sign bit = 0 —(+ve) ; 1 —(-ve)


Exponent = (2ⁿ⁻¹)+ power
Mantissa = 23 bit floating point

17
Fall-23

c) How will you represent -29.55 x 10⁻³ in using IEEE 754 binary 32 bit format?
2 x 0.02955
0.0591 0
Answer:
(-29.55 x 10⁻³ ) = - 0.02955 2 x 0.0591
0.1182 0
(-0.2955) = 0.00000111 100100001001 2 x 0.1182
0.2364 0

Sign(1) = 1 2 x 0.2364
Exponent(8) = (2^7-1)-6=121=0111 1001 0.4728 0
Mantissa(23) = 11100100001001011010111
Answer: 1 0111 1001 11100100001001011010111 2 x 0.4728
0.9456 0
2 x 0.9456
0.8912 1
2 x 0.8912
1.7824 1
2 x 0.7824
1.5648 1 118
Fall-23

c) How will you represent -29.55 x 2⁻³ in using IEEE 754 binary 32 bit format?

19
Spring-23

a) Perform the following number conversion:

i. (1423)₅ = (?)₉
ii. (249D)₁₆ = (?)₈

20
Spring-23

b)

i. Computer cannot perform subtraction as human. It uses an additive approach to do so. Now perform
subtraction 78₁₀ from 52₁₀ using the additive approach.

78 = 0100 1110
52 = 0011 0100

52-78=52+(-78)

78 = 0100 1110

1011 0001
+1 –1’s Complement
—------------------
1011 0010 –2’s Complement

52 = 0011 0100
-78 = 1011 0010
—-----------------
1110 0110
21
Spring-23

ii. Divide (11011)₂, by (101)₂

22
Spring-23

c) Show-how can we represent 121.3750 into an IEEE 754 binary 32 bit format?

121 = 111 1001


.3750= 011
121.3750=1111001.011

Sign(1) = 0
Exponent(8) = (2^7)+6=133=1000 0101
Mantissa(23) = 1110 0101 1000 0000 0000 000
Answer: 0 1000 0101 11100101100000000000000

23
Fall-22

Solve following: (Specifying all the steps)

i. (928356)₁₀ = (?)₁₆
ii. (654231)₇ = (?)₅

24
Fall-22

3.
(a) Solve the complement of the number (643)₁₀

643 = 0010 1000 0011


1101 0111 1100
+1
-----------------------------
(-643)= 1101 0111 1101

25
Fall-22

(b) Solve the following:

i. (00110110)₂ - (10110101)₂

1011 0101
0100 1010
+1
—------------
0100 1011
0011 0110
--------------
1000 0001

26
Fall-22

ii. (101011)₂ x (001101)₂

27

You might also like