The binary number 10000000 represents the decimal 128
192 = 1100 0000 168 = 1010 1000 0 = 0000 0000 1 = 0000 0001 192.168.0.1 = 11000000.10101000.00000000.00000001 = 11000000.10101000.0.1
8
It's 8. (Next time you can use calc.exe of your windows.)
Each hexadecimal digit (or nybble) is the equivalent of 4 binary digits (or bits) with a decimal value of 0-15. Convert each nybble into (4) binary (digits) and string them together, remembering the conversion of decimal 0-15 to binary: Hex -> Dec -> Binary 0 -> 00 -> 0000 1 -> 01 -> 0001 2 -> 02 -> 0010 3 -> 03 -> 0011 4 -> 04 -> 0100 5 -> 05 -> 0101 6 -> 06 -> 0110 7 -> 07 -> 0111 8 -> 08 -> 1000 9 -> 09 -> 1001 A -> 10 -> 1010 B -> 11 -> 1011 C -> 12 -> 1100 D -> 13 -> 1101 E -> 14 -> 1110 F -> 15 -> 1111 So to convert 0x6AF to binary: 6 -> 0110 A -> 1010 F -> 1111 => 0x6AF = 0110 1010 1111 = 011010101111 (without the spaces showing the hex nybbles)
The binary number 10000000 represents the decimal 128
0000 0000 1111 1000F ( or 15) = 1111 in binary, and 8 = 1000 in binary, so F is 1111 1000
When a bit is turned on, it represents a "1". When it is turned off, it represents a "0". The exact value depends on where the bit is within the byte it is part of. In the binary number 0000 0001, the last bit is set to 1 and represents the number 1. In the binary number 0000 0010, the second to last bit is set to 1, which corresponds to the "2's" place relative to decimal numbers. In the binary number 0000 1000, the bit that is set to 1 represents the value "8" in decimal numbers.
192 = 1100 0000 168 = 1010 1000 0 = 0000 0000 1 = 0000 0001 192.168.0.1 = 11000000.10101000.00000000.00000001 = 11000000.10101000.0.1
1000 = 8
8 in decimal is 1000 in binary
Floating point numbers are stored in scientific notation using base 2 not base 10.There are a limited number of bits so they are stored to a certain number of significant binary figures.There are various number of bytes (bits) used to store the numbers - the bits being split between the mantissa (the number) and the exponent (the power of 10 (being in the base of the storage - in binary, 10 equals 2 in decimal) by which the mantissa is multiplied to get the binary/decimal point back to where it should be), examples:Single precision (IEEE) uses 4 bytes: 8 bits for the exponent (encoding ±), 1 bit for the sign of the number and 23 bits for the number itself;Double precision (IEEE) uses 8 bytes: 11 bits for the exponent, 1 bit for the sign, 52 bits for the number;The Commodore PET used 5 bytes: 8 bits for the exponent, 1 bit for the sign and 31 bits for the number;The Sinclair QL used 6 bytes: 12 bits for the exponent (stored in 2 bytes, 16 bits, 4 bits of which were unused), 1 bit for the sign and 31 bits for the number.The numbers are stored normalised:In decimal numbers the digit before the decimal point is non-zero, ie one of {1, 2, ..., 9}.In binary numbers, the only non-zero digit is 1, so *every* floating point number in binary (except 0) has a 1 before the binary point; thus the initial 1 (before the binary point) is not stored (it is implicit).The exponent is stored by adding an offset of 2^(bits of exponent - 1), eg with 8 bit exponents it is stored by adding 2^7 = 1000 0000Zero is stored by having an exponent of zero (and mantissa of zero).Example 10 (decimal):10 (decimal) = 1010 in binary → 1.010 × 10^11 (all digits binary) which is stored in single precision as:sign = 0exponent = 1000 0000 + 0000 0011 = 1000 00011mantissa = 010 0000 0000 0000 0000 0000 (the 1 before the binary point is explicit).Example -0.75 (decimal):-0.75 decimal = -0.11 in binary (0.75 = ½ + ¼) → 1.1 × 10^-1 (all digits binary) → single precision:sign = 1exponent = 1000 0000 + (-0000 0001) = 0111 1111mantissa = 100 0000 0000 0000 0000 0000Note 0.1 in decimal is a recurring binary fraction 0.1 (decimal) = 0.0001100110011... in binary which is one reason floating point numbers have rounding issues when dealing with decimal fractions.
8
1 + 1,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111 = 1,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,112 Unless it is binary, in which case: 1 + 111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 11111 1111 1111 1111 1111 = 1000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
in EBCDIC: 11001000, 10000101, 10010011, 10010011 10010110 in ASCII: 1001000, 1100101, 1101100, 1101100, 1101111 in Unicode: 0000 0000 0100 1000, 0000 0000 0110 0101, 0000 0000 0110 1100, 0000 0000 0110 1100, 0000 0000 0110 1111
It is 8 (2 to the power 3).
Binary Coded Decimal (BCD) is a set of coding systems for storing decimal digits in binary code. There are several such codes, I will give examples of 3: straight BCD, XS3 BCD, and 2 of 5 BCD. Straight BCD uses the actual binary value of the decimal digit value: 0 = 0000 1 = 0001 2 = 0010 3 = 0011 4 = 0100 5 = 0101 6 = 0110 7 = 0111 8 = 1000 9 = 1001 XS3 BCD adds 3 to the binary value of the decimal digit value to make the code: 0 = 0011 1 = 0100 2 = 0101 3 = 0110 4 = 0111 5 = 1000 6 = 1001 7 = 1010 8 = 1011 9 = 1100 2 of 5 BCD uses a 5 bit code where only 2 bits can be on in a decimal digit's code: 0 = 00011 1 = 11000 2 = 10100 3 = 10010 4 = 10001 5 = 01100 6 = 01010 7 = 01001 8 = 00110 9 = 00101