edited by
8,309 views
25 votes
25 votes
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 ______
edited by

5 Answers

0 votes
0 votes

Convert this number into hexadecimal first, So to do this I will divide the given number by 16 

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

as we can see that 16 is a common term in all except the last term, so on dividing by 16 we get 3 as remainder so next time the expression would be $16^{2}*9+16*7+5$ again upon division by 16 we would get 5 as remainder. Similarly, we would keep dividing and we would get 7 and 9 as the remainder respectively.

So the number in hexadecimal would be 9753 and we would just convert it into binary we get $(1001 0111 0101 0011)_{2}$

Hence 9 1's are there.

Answer:

Related questions

37 votes
37 votes
1 answer
1
Kathleen asked Sep 12, 2014
4,941 views
When two $4$-bit numbers $A = a_3a_2a_1a_0$ and $B=b_3b_2b_1b_0$ are multiplied, the bit $c_1$ of the product $C$ is given by ________
33 votes
33 votes
8 answers
2
Kathleen asked Sep 12, 2014
10,250 views
Consider the following recursive definition of $fib$:fib(n) := if n = 0 then 1 else if n = 1 then 1 else fib(n-1) + fib(n-2)The number of times $fib$ is called (includin...
44 votes
44 votes
2 answers
3
Kathleen asked Sep 12, 2014
13,719 views
The weighted external path length of the binary tree in figure is ______
50 votes
50 votes
3 answers
4
Kathleen asked Sep 12, 2014
8,794 views
The minimum number of comparisons required to sort $5$ elements is ______