4+2+1
A bit is a 1 or a 0
A byte is typically 8 bits, in which case it can have a value between 0 and 255.
There are 2 possible values for each digit and there are 8 digits. 28 is 256. Because 0 is also a number, 11111111 is equal to 255 (decimal) rather than 256.
The first digit is 20, the second digit is 21, the third digit is 22, and so on. The 1 is a yes and the 0 is a no.
20 = 1
21 = 2
22 = 4
23 = 8
24 = 16
25 = 32
26 = 64
27 = 128
So 10101101 would be:
[1 x 27] + [0 x 26] + [1 × 25] + [0× 24] + [1 × 23] + [1 × 22] + [0 × 21] + [1 × 20] =
[1 x 128] + [0 x 64] + [1 × 32] + [0× 16] + [1 × 8] + [1 × 4] + [0 × 2] + [1 × 1] =
128 + 32 + 8 + 4 + 1 = 173
So, 10101101 = 173
A more specific answer to you question:
00000111
[0 x 27] + [0 x 26] + [0 × 25] + [0× 24] + [0 × 23] + [1 × 22] + [1 × 21] + [1 × 20] =
[0 x 128] + [0 x 64] + [0 × 32] + [0× 16] + [0 × 8] + [1 × 4] + [1 × 2] + [1 × 1] =
4 + 2 + 1 = 7
So, 00000111 = 7
If "111111" is not a decimal number, then you haven't told us what it is now.
We'll kind of need to know that in order to convert it to a decimal number.
-- If it's a binary number (base-2), then decimal = 63
-- If it's base-3, then decimal = 364
-- If it's base-4, then decimal = 1,365
-- If it's base-5, then decimal = 3,906
-- If it's base-6, then decimal = 9,331
-- If it's base-7, then decimal = 19,608
-- If it's base-8, then decimal = 37,449
-- If it's base-9, then decimal = 66,430
-- If it's base-11, then decimal = 177,156
-- If it's base-12, then decimal = 271,453
etc.
All I know is that when a number is negative, you convert the decimal into binary and if it is negative you put 1111 before the binary digits.
In binary the largest number (using IEEE binary16) representable would be: 0111 1111 1111 1111 (grouping the bits in nybbles* for easier reading). This is split as |0|111 11|11 1111 1111| which represents: 0 = sign 111 11 = exponent 11 1111 1111 = mantissa. Using IEEE style, the exponent is offset by 011 11, making the maximum exponent 100 00 This is scientific notation using binary instead of decimal. As such there must be a non-zero digit before the binary point, but in binary this can only ever be a 1, so to save storage it is not stored and the mantissa effectively has an extra bit, which for the 10 bits specified makes it 11 bits long. Thus the mantissa represents: 1.11 1111 1111 This gives the largest number as: 1.1111 1111 11 × 10^10000 (all digits are binary, not decimal.) This expands to 1 1111 1111 1100 0000 (binary) = 0x1ffc0 = 131,008 Note that this is NOT accurate in storage - there are 6 bits which are forced to be zero, making the number only accurate to ±32 (decimal): the second largest possible real would be 1 1111 1111 1000 000 = 0x1ff80 = 130,944 - the numbers are only accurate to about 4 decimal digits; the largest decimal real number would be 1.310 × 10^5, and the next 1.309 × 10^5 and so on. However, with proper IEEE, an exponent with all bits set is used to identify special numbers, which makes the largest possible 0111 1101 1111 1111 which is 1.1111 1111 11 × 10^1111 = 1111 1111 1110 0000 = 0xffe0 = 65504 accurate to ±16, ie the largest is about 6.55 × 10^4. * a nybble is half a byte which is directly representable as a single hexadecimal digit.
1111 converted from binary (base 2) to decimal (base 10) is 15 When you expand the steps... 1111 binary = (1 X 2^3) + (1 X 2^2) + (1 X 2^1) + (1 X 2^0) = 8 + 4 + 2 + 1 = 15
0xc = 1100 Hexadecimal digits use exactly 4 binary digits (bits). The 0x0 to 0xf of hexadecimal map to 0000 to 1111 of binary. Thinking of the hexadecimal digits as decimal numbers, ie 0x0 to 0x9 are 0 to 9 and 0xa to 0xf are 10 to 15, helps with the conversion to binary: 0xc is 12 decimal which is 8 + 4 → 1100 in [4 bit] binary.
16 is the 4th power of 2. So a hexadecimal number is converted to binary by replacing each hex digit by the 4-bit binary number having the same value. Conversely, in converting binary to hexadecimal, we group every 4 bits starting at the decimal (binary?) point and replace it with the equivalent hex digit. For example, the hexadecimal number 3F9 in binary is 1111111001, because 3 in binary is 11, F (decimal 15) is 1111, and 9 is 1001.
The binary number 1111 = 15
15 = 1111
1111 = 15
1111 in binary is 15 in decimal. 1111 in decimal is 10001010111‬ in binary.
1111 1111 base 2
It is 1111.
1111 in binary is 15 in decimal.
1111 1111
All I know is that when a number is negative, you convert the decimal into binary and if it is negative you put 1111 before the binary digits.
111111 in binary is 255 in decimal which is FF in hexadecimal (i.e. 15 units and 15 16s)
In binary: 1111 1111 1111 1111 1111 1111 1111 1111 In octal: 37777777777 In hexadecimal: FFFFFFFF in decimal: 2³² - 1 = 4,294,967,295
The binary number 1111 is 15. The digits in a binary number are exponents of 2 rather than 10, so that for a four digit number in binary, the digit places represent 8, 4, 2, 1 instead of increasing values of 10. 1111 = 8+4+2+1 = 15