Counting to 15 in binary:
0
1
10
11
100
101
110
111
1000
1001
1010
1011
1100
1101
1110
1111
Chat with our AI personalities
I'm assuming the question here is asking how to convert the decimal number 10 to binary.
First, we need to find the largest power of 2 that will go into 10. 24, or 16, is too large, so we'll go with 23, or 8. The difference between 8 and 10 is 2, which is just 21.
So, we can see that 10 can be represented as 23 + 21, which in binary is 1010, because you put a 1 in the 2's place and a 1 in the 8's place.
This is how you count to 10 in binary:
0001 (20)
0010 (21)
0011 (21+20)
0100 (22)
0101 (22+20)
0110 (22+21)
1000 (23)
1001 (23+20)
1010 (23+21)
Let's give a simple answer and explanation:
1101 = 1000 + 100 + 1 [binary]
= 8 + 4 + 1 [decimal]
8 + 4 + 1 = 13 [decimal]
Transmission Media
Binary is the most primitive form of numeric notation and is by far the easiest to implement at the machine level.
NOTE: The program below is written in the form of a straight forwards 'table/look up' chart. It will, quite simply, convert no more than 1 single hex digit character, at a time, into its binary number equivalent. If you wish to convert a whole entire string of hex digit characters together at once; then, I suggest you will need to 'modify' the program yourself by using, possibly, a 'FOR/NEXT loop' statement to extract out each separate hex character which needs to be converted from the users input/together with a function such as, 'MID$()'. ==== Here is a sample program RUN/Output... Please, enter your single character hex digit(0-9/A-F): ? C The binary equivalent of the above hex digit is: 1100
Let's look at an example. If you want to convert the number 100112 to decimal you can split up the number so each digit has an index associated to it: 4 3 2 1 0 1 0 0 1 1 We can then find the decimal value: 24 * 1 + 23 * 0 + 22 * 0 + 21 * 1 + 20 * 1 = 16 * 1 + 8 * 0 + 4 * 0 + 2 * 1 + 1 * 1 = 16 + 0 + 0 + 2 + 1 = 19 So what we need to do is to multiply each of the binary digits by the value of two raised to the index of the digit. This will give you the conversion from any binary number to a decimal number.
First let's write it as a sum of powers of two. This will make it easier to write as a binary number. 19=16+2+1 This can be written: 19=16*1+8*0+4*0+2*1+1*1 So the binary form is: 10011