ByteSizeNotes Chapter 1.1
Chapter 1.1

Number Systems

Denary, Binary & Hexadecimal

  • Binary system:Base 2. Only has 2 values. Represented using 0 and 1.
  • Denary system:Base 10. Has 10 values. Represented with numbers from 0--9.
  • Hexadecimal:Base 16. Has 16 values. Represented with symbols 0--9 and letters A--F.

Explain why a computer can only process binary data

  • Computer consist of transistors/logic circuits that can only store process data in two states (on/off)
Similar question could be: explain why data needs to be converted to binary.

Uses of Hexadecimal

  • Error codes. Eg #404
  • HTML colour codes. Eg FFFFFF
  • URL
  • Memory Dump
  • IP addresses
  • Assembly language
  • ASCII/Unicode

Why do Developers prefer to use Hexadecimal?

  • Easier/quicker to understand/read/write
  • Easier/quicker to debug
  • Less likely to make a mistake
  • Shorter representation // Takes up less screen space
Think about the hexadecimal error code 404, the binary equivalent is:010000000100.Which is easier to memorise?

Describe a similarity & difference between Binary and Hexadecimal

  • They are both number systems
  • Binary is base 2 whereas hexadecimal is base 16
  • Binary only uses numbers whereas hexadecimal also uses letters // Binary only uses 0 and 1 whereas hexadecimal uses 0 to 9 and A to F

MAC Address

  • Made up of 48 bits
  • Shown as 6 groups of two hexadecimal digits
  • First half represents Manufacturer
  • Second half represents Serial number
  • Uniquely identifies a device on the network
  • eg. 11:11:11:11:11:11
  • MEDIA ACCESS CONTROL (only use if not referred to by the question!)

Overflow Errors

  • A computer has a predefined limit that it can represent (eg. 8 bits) Overflow occurs when a value outside this limit should be returned
  • Can occur when two binary numbers are added together the result cannot be represented in the current register.
  • eg. 255+10 in binary cannot be represented in the current size of the register.
  • Solution: use a 16 bit/2 byte register

What Effect does a Logical Shift have on a binary number

Example 1: 2 Left logical shifts on00010011

  • Result:01001100
  • The number has been multiplied by 2 to the power of 2

Example 2: 2 Left logical shifts on11010011

  • Result:01001100
  • Most significant bits are lost. The answer is incorrect
Before you answer these questions look at what is happening to your binary register. If a left most bit is lost use Example 2 answer, otherwise Example 1.
  • Left shifts = multiplication by 2^number of shifts
  • Right shifts = division by 2^number of shifts