COMPUTER SCIENCE CAFÉ
  • FOUNDATION YEARS
  • GCSE
  • IB
  • A LEVEL
  • LEARN TO CODE
  • CHALLENGES
  • ROBOTICS ENGINEERING
  • MORE
    • CLASS PROJECTS
    • Classroom Discussions
    • Useful Links
    • SUBSCRIBE
    • ABOUT US
    • CONTACT US
  • FOUNDATION YEARS
  • GCSE
  • IB
  • A LEVEL
  • LEARN TO CODE
  • CHALLENGES
  • ROBOTICS ENGINEERING
  • MORE
    • CLASS PROJECTS
    • Classroom Discussions
    • Useful Links
    • SUBSCRIBE
    • ABOUT US
    • CONTACT US
COMPUTER ORGANISATION |COMPUTER ARCHITECTURE
ON THIS PAGE
SECTION 1 | WHAT IS BINARY
SECTION 2 | NUMBER SYSTEMS
​SECTION 3 | HEXADECIMAL
SECTION 4 | CONVERTING BINARY TO HEXADECIMAL
​SECTION 5 | HEXADECIMAL COLOUR REPRESENTATION

ALSO IN THIS TOPIC
 COMPUTER ARCHITECTURE
SECONDARY MEMORY
OPERATING SYSTEMS
YOU ARE HERE | BINARY REPRESENTATION
LOGIC GATES
TOPIC 2 REVISION | NEW
KEY TERMINOLOGY
TOPIC 2 ANSWERS

Picture
WHAT IS BINARY ?
​Whilst computer are complex machines that are capable of a countless number of functions at an incomprehensible speed, when they are broken down to their most simple form, they are little more complex than a light switch.  Imagine if you had just two light switches and represented a letter with each combination of the switch settings, you could represent 4 different letters.
Picture
When you press a key on your keyboard an electrical signal is sent to your computer and converted to a binary representation, a combination of switches being on or off. To make it easy for visual representation we represent the OFF state with zeros and the ON state with ones. For example, when you press the letter A on your keyboard the electrical signal is converted and stored as 01000001, the letter B is stored as 01000010.

Whilst at its core the computer is no more complicated than a light switch, when you combine billions of light switches with the hundreds of thousands of components that create your computer, impressive things can be done.

Every keystroke, pixel on your screen, image you upload, sound played by your computer is all converted to a binary representation to be stored and processed on your computer.

Every process your computer does can be broken down to its binary representation, the processor can process billions of operations per second and each binary value is stored in a very fast and very small section of memory called a register whilst it is waiting to be processed.
A single binary digit is called a Bit, and multiple Bits have the following denotations:
  • Nibble - Four Bits (0000)
  • Byte - Eight Bits (00000000)
  • Kilobyte - 1024 bytes
  • Megabyte - 1024 Kilobytes
  • Gigabyte - 1024 Megabytes
  • Terabyte - 1024 Gigabytes
  • ​Petabyte - 1024 Terabytes
  • Exabyte - 1024 Petabytes
  • Zettabyte - 1024 Exabyte
  • ​Yottabyte - 1024 Zettabyte

(Note: In the computer industry the kilobyte, Megabyte and so on are known as 1024, however some people may argue that because the work kilo is used then it should be 1000, a new tern kibibyte was introduced to represent the 1024 value, however this is not widely recognised and the original representation as in this list above are normally used)
​ASCII
A byte can be used to represent letters, symbols and numbers as shown in the example below.
A byte can be used to represent letters, symbols and numbers as shown in the example below.

0 1 0 0 0 0 0 1 = A
0 1 0 0 0 0 1 0 = B
0 0 1 0 1 1 0 0 = 44

ASCII - American Standard Code for Information Interchange is the international agreed standard for the coding scheme used to represent the alphabet and other characters in binary. 

ACSII uses one byte to represent its assigned values therefore it can only represent 256 (2^8) unique characters, whilst this is fine for the English language some languages have many more characters, such as Chinese which has over 50,000 characters. Therefore these could not be represented using just one byte, so another binary coding system was developed called Unicode. There are various formats of Unicode and various ways in which representations are assigned but for the relevance at this level we can view Unicode as a 16 bits/two byte system, meaning (2^16) 65536 unique representations can be made. ​
THE NUMBER SYSTEM
The number system we all know has Units, Tens, Hundreds, Thousands and so on, we call this traditional number system the Denary number system. The binary number system has 1s, 2s, 4s, 8s, 16s, 32s and so on.

If one byte is used then we can represent 256 unique values. ​It is easy to work out how many representations can be made with a certain number of Binary digits by:
  • As each bit can be one of 2 values, either a 0 or a 1 we can calculate the amount of unique values that can be represented by 2 ^ n or 2 to the power ( ^ ) of the number (n) bits used. For example if we only used 3 bits the 2^3 = 8, we know we can only represent 8 combinations, as seen below.​
Picture
Like in traditional math if you take the value from each column and multiply it by the column header you get the total value of the number. In the example to the left we have (1 x 32) + (1 x 8) + (1 x 4) = 44
So Binary 00101100 is equivalent to Denary 44
Note: If the right most(least significant) binary digit is a 1 then binary value must be representing an odd number.

Make sure you list binary logically. As can be seen from the 8 examples listed; there is a clear pattern when Binary is listed in a logical way. The left most column will always have the pattern of 1 0 1 0 and so on, the next column will always have the pattern 00 11 00 11 and so on, the next four 0s then four 1s and this pattern continues. It is good practice to always list Binary using this method, and check n^2 to ensure no representation has been missed. ​
Binary > Numeric Equivalent
  • 0 0 0   = 0
  • 0 0 1   = 1
  • 0 1 0   = 2
  • 0 1 1   = 3
  • 1 0 0   = 4
  • 1 0 1   = 5
  • 1 1 0   = 6
  • ​1 1 1   = 7
HEXADECIMAL
Computers use binary to represent all data and instructions but binary is difficult for humans to read. Although the computer will always process data in a binary format Hexadecimal is used as an alternative representation.

Hexadecimal is a base 16 system and each hexadecimal value can only be represented by a single character, therefore to represent all 16 values within the Hex system the following values are used.
Picture
The number system we all know has Units, Tens, Hundreds, Thousands and so on. The Hexadecimal number system has 1s, 16s, 256s, 4096s and so on. ​
Picture
Like in traditional math if you take the value from each column and multiply it by the column header you get the total value of the number. Here we has the HEX value 1 0 4 1 so (1 x 4096 = 4096, 0 x 256 = 0, 4 x 16 = 64, 1 x 1 = 1). 4096 + 0 + 64 + 1 = 4161
So Hex 1041 is equivalent to Denary 4161
The chart below shows 3 numbers represented by Binary, Denary and HEX
Picture
CONVERTING BINARY TO HEXADECIMAL
To convert Binary to HEX you can simply split the Binary representation in to 4 bits then use each of the 4 bits to represent the HEX value. The table below shows 254 in binary 11111110 converted to HEX
Picture
HEXADECIMAL COLOUR REPRESENTATION
Just as numbers and letters are represented with Binary, so are images. To a computer an image is nothing more than a series of ones and zeros which allow the display of pixels in various colours.

To aid human reading of different colour codes, colours are commonly represented in Hexadecimal using the RGB Red Green Blue system. For example the chart below shows how pure blue is represented using HEX, the HEX code for pure blue is #00 00 FF, meaning it has zero red components, zero green components and the maximum amount of Blue components. 
​A brief colour chart for some of the other colours represented in hexadecimal.

Most software that allows you to manipulate images or colours will allow you to select colours by their HEX or RGB values.

​Remember: Hex is used for our benefit to make it easy for use to see and work with, but the computer still deals with colour in binary format.
Picture
Picture
ALSO IN THIS TOPIC
COMPUTER ARCHITECTURE
SECONDARY MEMORY
OPERATING SYSTEMS
BINARY REPRESENTATION
LOGIC GATES
TOPIC 2 REVISION | NEW
KEY TERMINOLOGY
TOPIC 2 ANSWERS
Picture
SUGGESTIONS
We would love to hear from you
SUBSCRIBE 
To enjoy more benefits
We hope you find this site useful. If you notice any errors or would like to contribute material then please contact us.