1.1 Number Systems


Need to know 3 types:

  1. Denary - base 10 number system

  2. Binary - base 2 number system

  3. Hexadecimal - base 16 number system


Hexadecimals

Letter
Corresponding Denary Equiv
Corresponding Binary Equiv

A

10

1010

B

11

1011

C

12

1100

D

13

1101

E

14

1110

F

15

1111

To work out hex from binary, split up the binary number into sections of 4 bits each. To convert from denary to hex, work out the binary, then follow the above table.

Uses

  • Error codes (memory locations of an error)

  • ASCII

  • Assembly Language

  • URLs

  • MAC addresses

  • IPv6 addresses

  • HTML colour codes

MAC

Stands for Media Access Control. It uniquely identifies a device on a network. It's made up of 48 bits, the first 3 hexadecimals are the manufacturers and the second half is the serial numbers.

HTML

Stands for HyperText Markup Language. It uses <tags> to bracket stuff. It is used to represent colours of text onscreen using RGB.


Binary

Addition

If adding two digits:

Numbers
Answer
Carry Value

0 + 0

= 0

-

0 + 1

= 1

-

1 + 0

= 1

-

1 + 1

= 0

1

If adding three digits:

Numbers
Answer
Carry Value

0 + 0 + 0

= 0

-

0 + 0 + 1

= 1

-

0 + 1 + 1

= 0

1

1 + 1 + 1

= 1

1

Overflow

This occurs when bits are 'pushed' off the grid. An overflow error can occur.

As an example:

Adding two 8 bit numbers:

  0 1 1 0 1 1 1 0
  1 1 0 1 1 1 1 0
  ---------------
1 0 1 0 0 1 1 0 0

We have 9 bits in the answer.

Just using 8 bits in the above example would give us an incorrect answer. The generation of the 9th bit is a clear indication that the sum has exceeded the value of 255 as that is the maximum of an 8 bit number. This is an overflow error because an 8 bit computer cannot store that answer.

This is why calculators sometimes come up with an error when adding or multiplying stupidly large numbers.

Logical Shifts

Computers can do a logical binary shift to either the right or the left. When doing this, we can cause an overflow error if the last or first bit is a 1. The right most bit is referred to as the LSB (least significant bit) and left most bit is the MSB (most significant bit).It's important to note that doing a shift will CHANGE the value of the number.

If you do a shift to the left -> multiply the number by 2

If you do a shift to the right -> divide the number by 2

Two's Complement

This is used when we want negative numbers. We change the most left bit to a negative value. As an example, if we have an 8 bit number, we will change the MSB (128) to -128.

When applying this rule to a binary number, the left most bit always determines whether the number is positive or negative. If a 1 is there, the number is negative. If a 0 is there, the number is positive.


Exam Questions

COPYRIGHT -> SAVEMYEXAMS

Last updated

Was this helpful?