You are on page 1of 3

Number system - Introduction to decimal

and binary and their interconversion

MCQs
MCQs
Q1- The number of digits in binary system are :
a) 2 b) 16

c) 10 d) None of the above

Q2- 1 Nibble contains _____ number of bits


a) 2 b) 4

c) 8 d) 16

Q3- Convert the following binary numbers to decimal numbers.

1101102
a) 58 b) 52

c) 54 d) 50

Q4- Convert the binary 10101 to its decimal equivalent.


a) 21 b) 12

c) 22 d) 31

Q-5 Convert the Given Decimal Number to Binary Number: 26210


a) 1001001012 b) 1000001012

c) 1000001102 d) 1100001102

Cracking the Coding Interview in C++ - Foundation


MCQs
Answers:
Ans 1 : a)2 : Binary comes in the form of 0’s and 1’s.

Ans 2 : b) 4

Ans 3 : c) 54

25 + 24 + 0 + 22 + 21 + 0

= 32 + 16 = 0 + 4 + 2 + 0

= 54

Ans 4 : a) 21

Explanation: To convert a binary number to its decimal equivalent follow these steps :

24 * 1 + 23 * 0 + 22 *1 + 21 * 0 + 20 * 1 = 21.

Ans 5 : c) 1000001102

Cracking the Coding Interview in C++ - Foundation

You might also like