100% found this document useful (1 vote)
116 views21 pages

Discrete Ass 1

The document contains 10 questions related to binary, decimal, octal and hexadecimal number conversions and arithmetic operations on these number systems. It provides the questions, solutions and conversions between different number systems. The questions cover topics like binary addition, subtraction, multiplication, conversion between decimal, binary, octal and hexadecimal.

Uploaded by

Zeeshan Jutt
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
100% found this document useful (1 vote)
116 views21 pages

Discrete Ass 1

The document contains 10 questions related to binary, decimal, octal and hexadecimal number conversions and arithmetic operations on these number systems. It provides the questions, solutions and conversions between different number systems. The questions cover topics like binary addition, subtraction, multiplication, conversion between decimal, binary, octal and hexadecimal.

Uploaded by

Zeeshan Jutt
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/ 21

Assignment # 1

Subject
DISCRETE STRUCTURES

Submitted To
MISS NIDA ASLAM

Submitted By
ZEESHAN BASHARAT

Roll no.
BITM-F21-070

Question # 1:
Convert these binary numbers to decimal;

a.10101
Answer:
= (21)10

b. 1101000111101
Answer:
= (6717)10

c. 10010110
Answer:
= (150)10

d. 101010101010
Answer:
= (2730)10

e. 101011111
Answer:
= (351)10

Question # 2:
Convert these decimal values to binary:

a.58
Answer:
= (111010)2

b. 2032
Answer:
= (11111110000)2

c. 5696
Answer :
= (1111001000000)2

d. 2688
Answer:
= (1110100000000)2

e. 1652
Answer:
= (11010100)2

f. 2313
Answer:
= (100100001001)2

g. 3.578
Answer:
= (11.1001001)2

h. 123.750
Answer :
= (1111011.11)2

Question # 3
Convert the following octal Numbers to decimal:
a.743
Answer:
= (483)10

b. 365
Answer:
= (245)10

c. 3777
Answer:
= (2047)10
d. 257
Answer:
= (175)10

e. 1204
Answer:
= (644)10

Question # 4
Convert the following decimal numbers to octal;
a.59
Answer;
= (73)8

b. 65536
Answer:
= (200000)8

c. 255
Answer:
= (377)8

d. 375
Answer:
= (567)8

e.819
Answer;
= (1463)8

f.76524
Answer;
= (225254)8

Question # 5
Convert these following hexa values to decimal
a.92
Answer:
= (146)10

b. FF
Answer:
= (255)10

c.2C1
Answer:
= (705)10

d.37FD
Answer;
= (14333)10

e.1B9
Answer:
= (441)10

Question # 6
Convert decimal values to hexa-decimal.
a.75
Answer;
16 75

16 4--B

= (4B)16

b.314
Answer:
16 314
16 19--
10
1--3

= (13A)16

c.4095
Answer:

16 4095

16 255 -15
16 15 -15
(FFF)16

-----------------------------------------------------------------

d.25619
Answer:

16 25619
16 1601 -3
16 100 -1
6 -4

( 6413)16

-----------------------------------------------------------------

e.65760
Answer:
16 65760
16 4110 -0
16 256 -14
16 16 -0
(100E0)16

Question # 7
Add the following binary
numbers:
a. 1010 + 1011
Answer:

1010

+ 1011

________

10101

________

b. 0.1011 + 0.1111
Answer:

0.1011

+ 0.1111

________
1.1010

________

c. 1111 + 0011
Answer:
1111

+ 0011

_______

10010

_______

d. 1011.1101 + 11.1
Answer:
1011.1101

+ 11.1000

_________

1111.0101

_________

e. 10011011 + 10011101
Answer:

10011011

+ 10011101
___________

100111000

___________

Question # 8:
Subtract the following
binary numbers:
a.101011100 – 11101110
Answer:
101011100

– 11101110

_____________

01101110

_____________

b.101010100 – 1111000
Answer:

101010100

- 1111000
_____________

11011100

_____________

c.111100000 – 10101111
Answer:

111100000

– 10101111

_____________

100110001

_____________

d.100000111 – 000001101
Answer:
100000111

– 000001101

_____________

011111010

_____________

Question# 9:
Convert the following
numbers with the
indicated bases into
decimal:
a. (4310)5
Answer:
( 580)10

b. (6241)7
Answer:
(2185)10

c. (85231)9
Answer:
(56323)10

d. (AB36)16
Answer:
(43830)10

e. (7D5C)16
Answer:
(32092)10

Question 10 :
Perform the following
operations:
a. (4817)16 + (792B)16
Solution:
Firstly we convert this into
binary:-

(4817)16 =
(0011100000010111)2

(792B)16
=(0111100100101011)2

Now perform operation:-

0011100000010111

+ 0111100100101011

---------------------------------

01011000101000010

---------------------------------

b. (79251)16 +( 3A1E1)16
Solution:
Firstly we convert this into
binary:-

(79251)16 =
(01111001001001010001)2

(3A1E1)16 =
(00111010000111100001)2
Now perform operation:-

01111001001001010001

+00111010000111100001

-------------------------------------

01011001101000010010

--------------------------------------

c. (CD66)16 + (B23A)16
Solution:
Firstly we convert this into
binary:-

(CD66)16 =
(1100110101100110)2

(B23A)16 =
(1011001000111010)2

Now perform operation:-

1100110101100110

+1011001000111010

------------------------------

010111111110100000

-------------------------------

d. (D423)16 – (A999)16
Solution:
Firstly we convert this into
binary:-

(D423)16 =
(1101010000100011)2

(A999)16 =
(1010100110011001)2

Now perform operation:-

1101010000100011

-1010100110011001

-----------------------------

010101010001010

-------------------------------

e. (1402)8 +( 2537)8
Solution:
Firstly we convert this into
binary:-

(1402)8 = (001100000010)2

(2537)8 = (010101011111)2
Now perform operation:-

001100000010
+010101011111

------------------------

010000110001

------------------------

f.
(011001111)2*(01101010)2
Solution:

011001111

* 01101010

----------------------------

000000000

011001111*

000000000**

011001111***

000000000****

011001111*****

011001111******
011001111*******

000000000********

----------------------------------

0101010110110110

-----------------------------------

g. (1015)16 * (F2)16
Solution:
Firstly we convert this into
binary:-

(1015)16 =
(0001000000010101)2

(F2)16 = (11010010)2
Now perform operation:-

00
01000000010101

* 11010010

------------
---------------------------

00
00000000000000

00
01000000010101*

000
0000000000000**

0000
000000000000***

00010
00000010101****

000000
0000000000*****

000100
0000010101******

0001000
000010101*******

--------------
------------------------------

0001101
0011000100111010

--------------
------------------------------

h. (326)8 * (66)8
Solution:
Firstly we convert this into
binary:-

(326)8 = (011010110)2
(66)8 = (110110)2
Now perform operation:-

011010110

*110110

----------
----------------------------

000000000

011010110*

011010110**

000000000***

0
11010110****

01
1010110*****
--------------
-----------------------------

01
0110100100100

--------------
-------------------------

i. (A5B6)16 – (58D)16
Solution:
Firstly we convert this into
binary:-
(A5B6)16 =
(1010010110110110)2

(58D)16 = (010110001101)2
Now perform operation:-

1010010110110110

- 010110001101

----------------------------

01010000000101001

-------------------------------

You might also like