0% found this document useful (0 votes)
83 views

Paper 1 Theory Unit 1 Binary and Hexadecimal Number Systems

The document discusses binary, hexadecimal, and denary number systems. It provides the following key points: 1) Binary uses only two digits, 0 and 1, and represents the on/off states of switches in computers. Hexadecimal uses 16 values to represent each digit in groups of 4 binary bits for more efficient storage and representation of binary data. 2) Converting between number systems involves grouping binary digits and representing them as hexadecimal, or repeatedly dividing denary numbers by the base of the target system. 3) Bytes and kilobytes are common units of digital storage and memory size, with a byte being 8 binary bits and kilobytes being multiples of 1024 bytes according to the IEC standard.

Uploaded by

Gamer Xenoir
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views

Paper 1 Theory Unit 1 Binary and Hexadecimal Number Systems

The document discusses binary, hexadecimal, and denary number systems. It provides the following key points: 1) Binary uses only two digits, 0 and 1, and represents the on/off states of switches in computers. Hexadecimal uses 16 values to represent each digit in groups of 4 binary bits for more efficient storage and representation of binary data. 2) Converting between number systems involves grouping binary digits and representing them as hexadecimal, or repeatedly dividing denary numbers by the base of the target system. 3) Bytes and kilobytes are common units of digital storage and memory size, with a byte being 8 binary bits and kilobytes being multiples of 1024 bytes according to the IEC standard.

Uploaded by

Gamer Xenoir
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Paper 1 Theory Unit 1 Binary and Hexadecimal Number Systems

The Binary Number System:- We are more familiar with the DENARY NUMBER system
No Matter how complex a Computer System which counts in the multiples of 10’s which leads us to the more
May be the basic building block in all computer known headings 10s, 100s, 1000s and so on.
systems is always the BINARY NUMBER
103=1000 102=100 101=10 100=1
SYSTEM. Since the computer is essentially
made up of million and millions of tiny Similarly the BINARY NUMBER system is based on the number 2 therefore
‘switches’ that are either ON (1) or OFF (0). there are only two values 0 and 1 that can be used to represent each digit.
Using the same method as denary the headings can be as follows:-
Converting from Binary to Denary 27=128 26=64 25=32 24=16 23=8 22=4 21=2 20=1
Converting a binary byte (8 bits)
01101101 to Denary by adding the 7 6 5 4 3
corresponding values on the first row all 2 =128 2 =64 2 =32 2 =16 2 =8 22=4 21=2 20=1
the bits that are valued ‘1’ and the ‘0’ are 0 1 1 0 1 1 0 1
simply ignored.
Therefore 64+32+8+4+1 = 109
Trial and Error Method:- Repetitive Division:-
Converting from Denary to Binary converting denary
Consider the conversion of the denary
This process is slightly more complex, and 246 to binary
number, 107, into binary. This method
there are two methods for doing this. (1) 246 / 2 à 123 remainder 0
involves placing ls in the appropriate
Trial and Error method (2) Repetitive 123 / 2 à 61 remainder 1
position so that the total equates to 107.
Division Method. 61 / 2 à 30 remainder 1
30 / 2 à 15 remainder 0
15 / 2 à 7 remainder 1
7 / 2 à 3 remainder 1
Measurement of the Size of Computers Memories:- 3 / 2 à 1 remainder 1
A BINARY DIGIT is referred to as BIT. 8 Bits make a BYTE. The Byte is the smallest 1 / 2 à 0 remainder 1
unit for Data Storage. Even if the computer allows for larger bytes (16 bit or 32 bit) they Reading the Remainders from BOTTOM to
are always a multiple of 8. A byte is really small and won’t allow storage of much data TOP results in 11110110.
that is why we need multiples of BYTES.
To give some idea of how these numbers work
consider the following example:-
- With a data transfer rate of 32megabits per second
(or 4MB/sec) a 40MB file will take 10seconds to
download.
- And a 2TB storage device can store over half a
million 4MB photos.

However it should be noted that the IEC (International Electrotechnical


Commission) convention for measurement of storage devices has been adopted
some organisations.
Denary System IEC Standard (a.k.a Binary System) It should be noted however, the IEC
terms are not universally used and we
1 kilobyte = 1000 bytes 1 kibibyte (KiB) = 1024 bytes
will stick to DENARY SYSTEM in this
1 megabyte = 1,000,000 bytes 1 mebibyte(MiB) = 1048576 bytes course (AS RECOMMENDED BY CIE)

1 gigabyte = 1,000,000,000 bytes 1 gibibyte (1GiB) = 1 073 741824 bytes


1 terabyte = 1,000,000,000,000 bytes 1 tebibyte (1TiB ) = 1099511627776 bytes
In which case if the Register
Uses of Binary Number System:- Contents are 10101010 it would
A register (to be discussed in detail later) usually An 8-bit register to control its represent the following state:-
holds ONE BYTE and used by Microcomputers movement can be set up as follows:-
to control devices such as robots. For example - Motor B is ON
consider the following robot which has moving - Motor C is ON
wheels A,B and C. - Both Motors B and C are
turning to produce
FORWARDS MOTION.

So therefore the Robot is Moving


Forward.

Hassan Zulfiqar Haider For more study material please visit:-


A-Levels/IGCSE/O-Levels Computer Science https://sites.google.com/site/csvault042/home
03234140902
[email protected]
Paper 1 Theory Unit 1 Binary and Hexadecimal Number Systems
Hexadecimal (or Hex) Number System :-
Binary Value Hex Value Denary Value
This number system is very closely related to the Binary Number System. It
is a base 16 number system which as 16 different values (0-9 followed by 0000 0 0
A-F) to represent each digit. The letters are valued as
- A=10,B=11,C=12,D=13,E=14, F=15 0001 1 1
4
- Since 2 =16 therefore we need 4 BITS to represent ONE HEX DIGIT. 0010 2 2
- Similar to denary and binary we have the following Hex headings.
164 163 162 161 160 0011 3 3
65,535 4,096 256 16 1 0100 4 4
Conversion Binary to Hex and Hex to Binary:-
Binary to Hex is a fairly simple process simply convert the binary number 0101 5 5
into groups of 4 bits (nibbles) and replace then the nibbles with their 0110 6 6
equivalent hex digit. (see the table).
1011111000001 0111 7 7
1011àB 1110àE 0001à1 1000 8 8
BE1
16
1001 9 9
Also consider the following Hex Number:-
4 5 A16 1010 A 10
4à0100 5à0101 Aà1010 1011 B 11
0100 0101 1010
Conversion Denary to Hex:- 1100 C 12
Converting from Denary to Hex number is a relatively simple process:-
1. convert denary to binary 1101 D 13
2. follow binary to hex conversion process. 1110 E 14
However for larger Denary Number the following steps may be required:-
consider the number 2004 1111 F 15
2004 / 16 = 125 remainder 4
125 / 16 = 7 remainder 13 à D
7 / 16 = 0 remainder 7
reading the remainders BOTTOM to TOP will results in 7 D 4
Where are Hex Numbers Used?
It is much easier to work with
B5A41AFC than 10111001101001000001101011111100
Memory Dumps:-
Whenever the contents of a memory are output a Monitor or
Printer it is known as a Memory Dump. These Outputs are used
by software developers when developing new programs to trace
errors. The hex codes on the far left represent the memory
address. Which makes it easier to identify the EXACT
MEMORY LOCATION where the error may have occurred. It MAC Address:-
is clear that computer data is much more manageable using Hex MAC address (or physical address) is a unique number that can be
Digits rather than binary which leads it to being a very effective used to identify a device on the Internet or LAN. It refers to the
FAULT TRACING tool rather than binary. Network Interface Car (NIC) and is made up of 48bits (can be 64
HTML:- bits as well) or 6 groups of hex digits (NN:NN:NN:DD:DD:DD) the
Hyper Text Markup Language is a (markup/design) language first 6 digits (NN) refer to the manufacturer of the device (For
that is specifically used for processing, definition and example Apple Computers : 00 1C B3). The remaining six digits
presentation of text on Web Pages (HTML is not a (DD) refers to individual device (4525FE). MAC address can be of
Programming Language). HTML can be used to represent he the following types:-
different colours of Text by varying the intensities of the Universally Administered MAC Address (UAA):
three primary colours (RED, GREEN, BLUE). For example:- It’s the most common and is set by the factory.
• FF00000 à Red Locally Administered MAC Address (LAA):-
• 00FF00à GREEN There may be some reasons to change MAC addresses even though
• 0000FFàBLUE they may cause big problems of they are not unique.
• FF8000àORANGE • For example some FIREWALLS or MAINFRAMES may
require MAC address to fall into a strict criteria for each
connecting device that is why they must be changed.
• Changing MAC address may also be required to get past
certain network restrictions.

Hassan Zulfiqar Haider For more study material please visit:-


A-Levels/IGCSE/O-Levels Computer Science https://sites.google.com/site/csvault042/home
03234140902
[email protected]
Paper 1 Theory Unit 1 Binary and Hexadecimal Number Systems
Web Address:-
It should be known that each character used on
a Keyboard is known as an ASCII (American
Standard Code for Information Interchange).
ASCII characters may be used to represent Web
Addresses (OR UNIFORM RESOURCE
LOCATOR/URL) using either DENARY or
HEX.
Therefore www.google.com will become
%77 %77 %77 %2E %67 %6F %6F %67 %6C
%65 %2E %63 %6F %6D
The “%” symbol means that the number is
written in Hexadecimal. If ASCII digits are used
to enter URLs you reduce the chances of copy
and pasting FAKE websites. And the process
can be even more sped up by using HEX.

Assembly Code and Machine Code:-


When using a Low Level Language (Assembly Language) or Machine Language program developers can directly refer
memory locations which comes in handy when troubleshooting. However, if Hexadecimal is used the size of code can
be drastically reduced (especially in machine code where Mnemonics are not available). For example consider the
following code:-
STO FFA4 (Assembly Code)
A5E4 FFA4 (Equivalent Machine code but written using Hex)
1010 0101 1110 0100 1111 1111 1010 0100 (Equivalent Machine Code using Binary)

Hassan Zulfiqar Haider For more study material please visit:-


A-Levels/IGCSE/O-Levels Computer Science https://sites.google.com/site/csvault042/home
03234140902
[email protected]

You might also like