How many 1's are there in the binary equivalent of ( 5 × 1 0 2 4 + 3 × 2 5 6 + 1 5 × 1 6 + 3 × 4 ) ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
You can solve it by more easy way...
Work out the denary answer first:
5 × 1 0 2 4 + 3 × 2 5 6 + 1 5 × 1 6 + 3 × 4 = 5 1 2 0 + 7 6 8 + 2 4 0 + 1 2 = 6 1 4 0
To convert this to binary, subtract powers of 2 until you get 0. Start with the biggest power of 2 that is smaller than 6140, and note down each time you subtract a power of 2. The total number of times you subtract a power of 2 is the solution, as this is how many ones are in the 2 0 or 2 1 or 2 2 ... columns.
The first number to subtract is 2 1 2 , which is 4 0 9 6 . 6 1 4 0 − 4 0 9 6 = 2 0 4 4 Next, it is 2 1 0 as 2 1 1 ( 2 0 4 8 ) is bigger than 2044. Next, it is 2 9 , then 2 8 , 2 7 , 2 6 , 2 5 , 2 4 , 2 3 , and finally 2 2 .
This is a total of 10 numbers subtracted, so there are 10 of those numbers in 6140, hence there are 1 0 ones in the binary equivalent of 6140.
multiplying in binary system is like the decimal system, we used to, when you counter zeros, it doesn't change then multiply the non-zero numbers. ex, in decimal,
2 ∗ 1 0 0 = 2 0 0 ,
in binary, 2 ∗ 1 0 0 = 1 0 0 0 .
we just multiply the nonzero number but in the binary form. Note that in binary ( 2 x ) 1 0 = ( 1 0 x ) 2
so, ( 5 ∗ 2 1 0 ) 1 0 = ( 5 ) 1 0 ∗ ( 1 0 1 0 ) 2 = ( 1 0 1 ) 2 ∗ ( 1 0 1 0 ) 2
similarly,
( 3 ∗ 2 8 ) 1 0 = ( 1 1 ) 2 ∗ ( 1 0 8 ) 2
( 1 5 ∗ 2 4 ) 1 0 = ( 1 1 1 1 ) 2 ∗ ( 1 0 4 ) 2
( 3 ∗ 2 2 ) 1 0 = ( 1 1 ) 2 ∗ ( 1 0 2 ) 2
Now, we can easily see that the number : ( 1 1 ) 2 ∗ ( 1 0 2 ) 2 + ( 1 1 1 1 ) 2 ∗ ( 1 0 4 ) 2 + ( 1 1 ) 2 ∗ ( 1 0 8 ) 2 + ( 1 0 1 ) 2 ∗ ( 1 0 1 0 ) 2 =
1 0 1 1 1 1 1 1 1 1 1 0 0 2
and it has 1 0 ones
Problem Loading...
Note Loading...
Set Loading...
The given expression can be written as
( 2 2 + 1 ) ∗ 2 1 0 + ( 2 2 − 1 ) ∗ 2 8 + ( 2 4 − 1 ) ∗ 2 4 + ( 2 2 − 1 ) ∗ 2 2 =
( 2 1 2 + 2 1 0 ) + ( 2 1 0 − 2 8 ) + ( ( 2 8 − 2 4 ) + ( 2 4 − 2 2 ) =
2 1 2 + 2 ∗ 2 1 0 − 2 2 = 2 1 2 + 2 1 1 − 2 2 .
Now note that 2 0 + 2 1 + 2 2 + . . . . + 2 9 + 2 1 0 = 2 1 1 − 1 ,
and so 2 1 1 − 2 2 = 2 1 1 − 1 − 2 0 − 2 1 = 2 2 + 2 3 + . . . . + 2 9 + 2 1 0 .
Thus the binary equivalent of 2 1 2 + 2 1 1 − 2 2 is 1 0 1 1 1 1 1 1 1 1 1 0 0 2 ,
which has 1 0 1's.