Every digital device — a CPU, a calculator, a router — ultimately stores and moves information as patterns of two states: ON and OFF, which we write as 1 and 0. To read, design and debug digital circuits you must be completely fluent in the number systems that describe these patterns (binary, octal, decimal, hexadecimal), able to convert any number from one base to another (including fractions), do a little hex arithmetic, and know the standard codes (BCD, Excess-3, Gray, ASCII) used to package numbers and characters.
This is, by a wide margin, the single most repeated calculative topic in Bangladeshi ICT and Digital Logic exams (BCS, Bank IT/AGM, Combined bank officer, and IT-officer written papers). If you master the mechanical steps here you can pick up several guaranteed marks. This lesson builds every idea from first principles and then drills it with many fully worked conversions.
Learning objectives
- Explain what a base (radix) is and how positional notation gives each digit a weight.
- Convert integers and fractions between binary, octal, decimal and hexadecimal in both directions.
- Use the 3-bit and 4-bit grouping shortcuts for binary↔octal and binary↔hexadecimal.
- Perform hexadecimal addition with correct carry handling.
- Compute the number of bits needed for N values using ⌈log₂ N⌉ and state the range of an n-bit number.
- Distinguish weighted vs non-weighted codes and convert using BCD 8421, Excess-3, Gray code and ASCII.