0% found this document useful (0 votes)
39 views39 pages

Data Representation

Uploaded by

Armaan Syed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views39 pages

Data Representation

Uploaded by

Armaan Syed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

Assessment

• Computer systems
• Algorithms, programming
• 1 Data representation and logic
• 2 Data transmission • 7 Algorithm design and
• 3 Hardware problem-solving
• 4 Software • 8 Programming
• 5 The internet and its uses • 9 Databases
• 6 Automated and emerging • 10 Boolean logic
technologies
1.1 Number systems

1.1.1 Binary represents data

Computers contain millions and millions of tiny ‘switches’, which must


be in the ON or OFF position, they can be represented by the binary
system. A switch in the ON position is represented by 1; a switch in the
OFF position is represented by 0.
1.1.2 Binary, denary and hexadecimal systems

The binary system

Thus, only the two ‘values’ 0 and 1 can be used in this system to
represent all values. Using the same method as denary, this gives
the headings 20, 21, 22, 23,and so on. The typical headings for a
binary number with eight digits would be:
Converting from binary to
denary
Converting from denary to
binary
Converting from denary to
binary
The hexadecimal system
The hexadecimal number system is very closely related to the binary
system.
Hexadecimal (sometimes referred to as simply ‘hex’) is a base 16
system and
therefore needs to use 16 different ‘digits’ to represent each value.
Because it is a system based on 16 different digits, the numbers 0 to 9
and the
letters A to F are used to represent each hexadecimal (hex) digit. A in
hex = 10
in denary, B = 11, C = 12, D = 13, E = 14 and F = 15.
Converting from hexadecimal to denary and from denary to
hexadecimal

To convert hexadecimal numbers into denary involves the value


headings of each hexadecimal digit; that is, 4096, 256, 16 and 1.

Take each of the hexadecimal digits and multiply it by the heading


values. Add
all the resultant totals together to give the denary number. Remember
that
the hex digits A → F need to be first converted to the values 10 → 15
before
carrying out the multiplication. This is best shown by two examples:
1.1.3 Use of the hexadecimal system
Four uses of the hexadecimal system:
• » error codes
• » MAC addresses
• » IPv6 addresses
• » HTML colour codes
Error codes

• Error codes are often shown as hexadecimal values.


• These numbers refer to the memory location of the error and are
usually automatically generated by the computer.
• The programmer needs to know how to interpret the hexadecimal
error codes.
Media Access Control (MAC) addresses

• Media Access Control (MAC) address refers to a number which


uniquely identifies a device on a network.
• The MAC address refers to the network interface card (NIC) which is
part of the device.
• The MAC address is rarely changed so that a particular device can
always be identified no matter where it is.

You might also like