Summary
Highlights
A bit is a 1 (high voltage) or a 0 (low voltage). A group of eight bits forms a byte. IPv4 addresses are 32-bit (four 8-bit numbers in decimal format, like 192.168.10.3), while MAC addresses are 48-bit and IPv6 addresses are 128-bit, often represented in hexadecimal for conciseness. Devices internally convert all formats to ones and zeros, making understanding these conversions crucial.
To convert binary to decimal, use place values: 128, 64, 32, 16, 8, 4, 2, 1. For example, 11000111 binary is 128 + 64 + 4 + 2 + 1 = 199 decimal. Another example, 01100011 binary is 64 + 32 + 2 + 1 = 99 decimal. Eight ones (11111111) equals 255, and eight zeros (00000000) equals 0. IPv4 decimal numbers range from 0 to 255.
To convert decimal to binary, find the largest place values that sum up to the decimal number. For 204 decimal, it's 128 (1) + 64 (1) + 8 (1) + 4 (1), giving 11001100 binary. For 46 decimal, it's 32 (1) + 8 (1) + 4 (1) + 2 (1), resulting in 00101110 binary. This involves identifying which place values are 'on' (1) and which are 'off' (0).
To convert binary to hexadecimal, separate the binary number into groups of four bits and use a conversion chart. For example, 11001001 binary becomes 1100 (C) and 1001 (9), resulting in C9 hex. For 01011010 binary, it's 0101 (5) and 1010 (A), resulting in 5A hex. Converting hexadecimal to binary involves reversing this process, where each hex digit translates to four binary bits. It's crucial to distinguish between decimal and hexadecimal numbers, often indicated by an 'H' suffix for hex to avoid confusion, as devices process them differently.