The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+7 votes
526 views
Consider the number given by the decimal expression:

$$16^3*9 + 16^2*7 + 16*5+3$$

The number of 1’s in the unsigned binary representation of the number is ______
asked in Digital Logic by Veteran (68.8k points) | 526 views

2 Answers

+17 votes
Best answer

Hex representation of given no. is (9753)16

Its binary representation is (1001 0111 0101 0011)2

The no. of 1's is 9

answered by Boss (6.3k points)
selected by
+2 votes

 

$16^3∗9+16^2∗7+16∗5+3$
In Binary representation, each number which can be represented in the power of 2 contains only one 1. 
For example 4 = 100, 32 = 100000
$16^3∗9+16^2∗7+16∗5+3$
Convert the given expression in powers of 2.
$16^3∗9+16^2∗7+16∗5+3$
$2^{12}∗(8+1)+2^8∗(4+2+1)+2^4∗(4+1)+(2+1)$
$2^{15}+2^{12}+2^{10}+2^9+2^8+2^6+2^4+2^1+ 2^0$

There are total 9 terms, hence, there will be nine 1's. for example 4+2 = 6 and 4 contains two 1's.

answered by Veteran (37.9k points)


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

32,330 questions
39,146 answers
108,247 comments
36,501 users