7710 = 10011012
Chat with our AI personalities
To convert from binary to octal, bitwise AND the binary value with 0x8 (00000111 in binary) and push the value onto a stack. Right-shift (>>) the binary value by 3 bits and repeat until the binary value is zero. Pop the stack to build the left-to-right digits of the octal value. Using 10110100 as an example: 10110100 & 00000111 = 00000100 10110100 >> 3 = 00010110 00010110 & 00000111 = 00000110 00010110 >> 3 = 00000010 00000010 & 00000111 = 00000010 00000010 >> 3 = 00000000 Popping the values in order reveals 00000010, 00000110 and 00000100 (decimal 2, 6 and 4 respectively). Thus 10110100 binary is 0264 octal.
8 in decimal is 1000 in binary
That depends what you mean by "B", and what you mean by "binary code" assuming that by "binary code", you actually mean a binary representation of it's ascii value, then the answer is 1000010. The ascii value of the character "B" is 66 in decimal, which is 1000010 is that value in binary. If on the other hand, you mean "what is the binary value of the hexidecimal number B?", then the answer is 1011.
The number 6 in binary is 110
The binary values is 10110101.