How do I put 10101011 from binary into decimal?

As with all binary numbers, you can start from the right side. The furthest right place represents the 20 (=1) place. As you move left, the places represent 21, 22, 23, etc. So, as you go from the right to the left, you can find the decimal representation by multiplying the binary digit by the place it is in. Then, you should add up all of these numbers.
Using 10101011 starting from the furthest right, 120​ = 1, 121 = 2, 022 = 0, 123​ = 8, 024 = 0, 125 = 32, 026 = 0, 127 = 128.
Now, add these numbers together: 1+2+0+8+0+32+0+128 = 171. 

LG

Related Computing GCSE answers

All answers ▸

Compress the following bit pattern using RLE (Run Length Encoding). 1111 0011 1100 0000


How would you check if a number is palindrome using a looping algorithm in any programming language ?


Describe the time complexity for the search operation in a binary search tree.


James would like to store a video clip that is 20 frames per second and has a duration of 76 seconds. The resolution of this video is 1280x720 with a colour depth of 24 bits. Calculate the storage requirement for the uncompressed video clip.