Become a premier member today to gain access to exclusive member benefits! Just $5.00 to join FOR LIFE!
In computers, everything is represented by 1s and 0s. This is called a binary number.
As an example, the integer 5 is represented in binary form by 101. This means, working from right to left:
1*2^0 + 0*2^1 + 1*2^2 = 1+0+4 = 5
Given an input file (decimals.txt) of 500 integers, how many 1s IN TOTAL appear in the file in each numbers binary representation?
Say you had the numbers 5, 7 and 10
5 = 101 7 = 111 10 = 1010 Total number of 1s: 7
**Register or login to submit the answer & earn 25 rewards points!(or 50 if you're a premium member)!**