Number Systems (Binary and Hexadecimal)

Context: FIT1047_MOC · positional notation in bases , , · the Assignment 1 hand skill · basis of Signed Integer Representation (Two’s Complement) and Floating Point Numbers (IEEE 754)

Quick Revision

  • 🎯 Objective: each digit is worth (digit) × (base) ➔ convert any direction between binary/decimal/hex + add binary by hand.
  • 📦 Core Components: weights table (binary→dec) ➔ repeated division (dec→binary) ➔ 4-bits-per-hex-digit (binary↔hex).
  • ⚡ Key Constraint: bits represent values ( to ) — the counting question examiners love.

📝 Core

  • Positional notation; same idea in base 2: .
  • Binary → decimal ➔ write weights over the bits, add the weights under the 1s.
  • Decimal → binary ➔ repeated division by 2, remainders read bottom-up (standard method for the A1 skill; slides teach the weights direction — drill both).
  • Capacity bits ⟹ values: 3 bits → , 5 bits → , 8 bits → .
  • Binary addition ➔ long addition with carries: (write 0 carry 1).
  • Hex ➔ base 16, digits ; one hex digit = exactly 4 bits ➔ group binary in 4s from the right: .

⚖️ Core Decision Matrix

ConversionMethodMicro-example
binary → decimalweights table, sum the 1-positions
decimal → binary÷2, remainders bottom-up ()
binary → hexgroup 4 bits from right → digit each
hex → binaryeach digit → 4 bits
decimal ↔ hexvia binary (fastest by hand)

📊 Exam Execution Trace

Manual Execution Trace — binary addition

StepColumn ()Bits + carryWriteCarry
1
2
3
4
Result: ✓ ().

✍️ Practice

⚠️ Common Mistakes

  • 💡 values vs largest value bits give values but the max is (zero occupies a slot).
  • 💡 Group hex from the RIGHT ➔ padding goes on the left; grouping from the left mangles the number.
  • 💡 Write the base subscript is ambiguous; — unlabeled bases lose marks.