Binary Numbers and Conversion
Your computer speaks only one language: binary. Instead of our usual base 10 system (denary), computers use base 2 - just 0s and 1s to represent everything.
Converting between binary and denary is straightforward once you get the hang of it. For denary to binary, write down the binary place values, put a 1 in the largest place that doesn't exceed your number, subtract that value, then repeat. Going the other way is even easier - just add up the place values where you see a 1.
Two's complement handles negative numbers in binary. To convert a negative denary number, write it as positive binary using full bit length, flip all the bits (invert), then add 1. Converting back? Subtract 1, invert, and stick a minus sign in front.
Quick Tip: Practice with small numbers first - once you master 4-bit conversions, 8-bit and 16-bit become much easier!





