Number Systems
Learn about number sets, bases and conversions.
Numbers for Counting
When we count objects, we use special symbols like . Nowadays, these numbers are generally accepted around the world, even though some languages have their own symbols to represent the same quantities like Chinese & Arabic.
These quantities are known as Natural Numbers/Counting Numbers.
For numbers to be qualified as Natural Numbers, they must be:
In Order: Each number in the set must be greater than the previous number.
Counting Numbers: The numbers must be usable for counting. Like 5 apples in a bag.
Infinite Set: There should be no limit to the amount of numbers the set can hold.
No fractions or decimals: Natural numbers cannot be expressed as fractions or decimals. They are discrete and do not include portions of a whole.
In AQA, zero is also a natural number, even though the scientific community doesn't really agree.
The following set is used to refer to natural numbers:
Integers
Any positive or negative whole number is called an integer. The following set is used to describe integers:
Rational Numbers
These are all numbers that can be expressed as fractions and ratios. They Include:
All values within the integer set.
Recurring values such as
0.3333333333 (1/3)
Irrational Numbers
Some numbers cannot be described exactly as a fraction, thus making them irrational. The decimal values of these numbers are endless.
Here are a few examples of irrational numbers:
Real Numbers
All rational and irrational numbers are considered to be real numbers, they are used for measurement. The set is represented via the mathematical symbol .
Ordinal Numbers
This is when numbers are used to represent rank or position of an entity, rather than representing quantities. An example of this would be "Have you completed the 1st assignment?".
Pictorial Summary
Number Systems
We use a number system called 10 (also known as ) for our calculations, as we count from 1 to 10. The reason why this base may have been chosen by our ancestors could be due to them having a total of 10 fingers.
Binary
Computers use base 2 (also known as Binary) due to it being easier to process and taking less space.
Below is a list of commonly used binary values.
1
00000001
2
00000010
3
00000011
4
00000100
5
00000101
6
00000110
7
00000111
8
00001000
9
00001001
10
00001010
Two's Complement
We can convert normal binary numbers into their negative values using two's complement. To do this you firstly need to turn the largest place value of the binary number into negative, and then use 1s and 0s accordingly to reach the negative representation of that value.
Here is an example: Converting the number 5 into -5
5:
0
1
0
1
-5:
1
0
1
1
The method above seems long & difficult, so we can use a short trick: To convert any binary number into negative, just go to the first value that is 1, keep it the same and all values behind it the same, and inverse all values that come after it.
Adding & Subtracting Binary Values
We add binary numbers just like we do with denary numbers, there are only two values in binary, which makes adding them easier. If there are two resultant digits, carry the one on the left. Here are things to keep in mind:
To subtract binary values, just use two's complement to turn the subtracting value negative, then just add the numbers together. This works because one plus and a negative makes a negative, like 5+-3 = 5-3 = 2
Here's a video about adding/subtracting in binary:
Multiplication in binary
Multiplication in binary is just like normal multiplication. Here's a video explanation:
Hexadecimal
Base 16 (also known as ) is a very common numerical system used widely by developers. The first 10 symbols of hex are the same as base 10, however it also uses ABCDEF. So in total there are 16 symbols.
Below is an example of converting the hex number 3F5 into denary.
The reason why developers use hex is that it is compact and uses less memory, so more numbers can be stored onto the computer. Also, less digits are required represent large numbers, this means that less space will be taken on display monitors when looking at the numbers. Also, the fact that the numbers look short, it makes it easier for the developers to memorise the numbers and quickly recall them, and it also helps them reduce confusion.
Usage of Hex:
Memory addresses
MAC addresses
Unicode characters
Colour Codes
You can convert hexadecimal into binary to perform mathematical operations.
Representation
To represent different bases, you can add a subscript under the value with the number of the base.
Base 10:
Base 2:
Base 16:
Conversion
Last updated