SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
M. Morris Mano, Michael D. Ciletti
Chapter:
Digital Systems And Binary Numbers
Exercise:
Problems
Question:8 | ISBN:9780132774208 | Edition: 5

Question

  1. Convert the decimal number 431 to binary in two ways (a)convert directly into binary;(b)Convert first to hexadecimal and then from hexadecimal to binary. Which method is faster?
TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

(a) Convert directly into binary:
In this method, we perform successive divisions by 2 and record the remainders until the quotient becomes 0. The binary representation is obtained by writing the remainders in reverse order.

Decimal 431:
431 ÷ 2 = 215 remainder 1
215 ÷ 2 = 107 remainder 1
107 ÷ 2 = 53 remainder 1
53 ÷ 2 = 26 remainder 1
26 ÷ 2 = 13 remainder 0
13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1

The binary representation of 431 is 110101111.

(b) Convert first to hexadecimal and then from hexadecimal to binary:
In this method, we convert the decimal number to hexadecimal and then convert the hexadecimal representation to binary.

Decimal 431:
431 in hexadecimal is 1AF.

Hexadecimal 1AF:
1AF in binary is 0001 1010 1111.

Comparing the two methods:
In terms of speed, converting directly into binary (Method a) is generally faster than converting first to hexadecimal and then from hexadecimal to binary (Method b). Method a requires performing successive divisions by 2, which can be done in a straightforward manner. On the other hand, Method b involves additional steps of converting to hexadecimal and then to binary, which require more computations.

Therefore, in this case, Method a (direct conversion to binary) is faster than Method b (conversion through hexadecimal).

0 0

Discussions

Post the discussion to improve the above solution.