0% found this document useful (0 votes)
20 views36 pages

CH02 - Data Transmission

This document discusses how computers represent and process different types of data using binary numbers. It covers binary, hexadecimal, and how text, images, and sound are converted to binary. Debugging using hexadecimal is also explained.
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)
20 views36 pages

CH02 - Data Transmission

This document discusses how computers represent and process different types of data using binary numbers. It covers binary, hexadecimal, and how text, images, and sound are converted to binary. Debugging using hexadecimal is also explained.
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/ 36

CH01 – Data Representation

Introduction

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• What is computer science? Computer science is the study of computers


and computational thinking. It includes the purpose and operation of
hardware, software and networks. Computer science involves studying
theoretical ideas about how data is processed and stored, and what would
be necessary to perform such theoretical operations. It is also the practical
application of these ideas to create new hardware and software.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• Studying hardware involves learning about the basic design of computers


and how they operate, including how they perform calculations, logical
operations and how they store data. It involves understanding how and
why binary is used in a computer for these processes.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

Data Representation
Chapter 1

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

Debugging using hexadecimal


• Computer programs are the foundation of computer games. If there is an error with the program, this can cause
unexpected behaviour in the game. For example, a character may move the wrong way when a button is pressed. The
programmer needs to find out why the character is moving incorrectly. The amount of code that needs to be assessed to
find this error in a computer game is enormous and the binary values involved will be vast. Therefore, the programmer
will often use hexadecimal to debug the error. One way this can be done is to look at the address for a variable. The
address is the location in memory where the data is stored and it is shown in hexadecimal. This address is then looked
up in a table to find the value held in the address. The value is also given as hexadecimal. If the value in the address is,
for example, 0000 or FFFF (this can mean that the variable has not been initiated) the programmer will know that there
is a problem with this value and has located the variable with which the error is occurring. The programmer can then
find out why the variable is not holding a valid value. If the addresses and values were given as binary, rather than as
hexadecimal, then it would be more difficult to identify if an error has occurred. For example, it is easier to see if an
address contains a valid value, e.g. F2A5, rather than 1111001010100101.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

1.1 Binary and hexadecimal


• Humans process a large amount of data on a daily basis. Did you know that
when we have a conversation with someone, we process approximately 60 bits
of information per second? Our brain is designed to process a maximum of
about 120 bits per second. That’s why it is so difficult to listen to two people
talk to us at once!

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• As humans, we process data that is called analogue data. Everything we


see, hear, feel and smell is a continuous stream of analogue data to our
senses.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

Number systems
• In our daily lives we mostly use a denary number system. This is called a
base-10 number system and uses the digits 0–9. The units in a denary
number system are ones, tens, hundreds and thousands. Each time the
unit increases by the power of 10.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• For example, the denary number 123 has:

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• Computers use a binary number system. This is called a base-2 number


system and uses the digits 0 and 1. The units in a binary number system
increase by the power of 2. Any denary values need to be converted to
binary values so that they can be processed by a computer.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

Working With Binary


• The binary system uses zero and one to represent whether a card is face
up or not. 0 shows that a card is hidden, and 1 means that you can see
the dots. For example:

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

Hexadecimal
• Hexadecimal is also a number system. Humans can use hexadecimal, but
computers cannot process it. Like denary numbers, hexadecimal numbers
also need to be converted to binary to be processed by a computer.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• Hexadecimal is a base-16 system and uses 16 symbols, these are the


numbers 0–9 and the letters A–F. This is to allow the denary values 0–15
to be represented in hexadecimal. This is shown in Table

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

Binary manipulation and negative numbers

• Binary addition
• You need to be able to add together two 8-bit binary numbers. When binary numbers
are added together there are four rules that you will need to use:
• Rule 1 is 0 + 0 = 0
• Rule 2 is 1 + 0 = 1
• Rule 3 is 1 + 1 = 10 (this is because 10 in binary is 2)
• Rule 4 is 1 + 1 + 1 = 11 (this is because 11 in binary is 3)

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• You can apply these rules to add the binary numbers 10010100 and
00011110.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

Negative binary numbers


• You can apply these rules to add the binary numbers 10010100 and
00011110.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

1.3 How do computers represent text, images and sound?

• Converting text to binary


• When a computer converts text to binary to be processed it uses a tool called a
character set. There are two main types of character set that a computer can use,
ASCII and Unicode. An ASCII character set represents characters using 8-bit binary
numbers. This means that it can represent up to 256 characters (0 to 255).
• A Unicode character set represents characters using 16-bit binary numbers.
• Each character has a set binary value, for example, the letter A is 01000001.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• Converting images to binary


• An image is made up of tiny dots called pixels. If an image was simply created using
the colours black and white, each pixel would be either black or white. The binary
value 1 could be used to represent the colour black and the binary value 0 could be
used to represent the colour white.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• If the computer is informed that the image that should be created using
this data is 9 pixels wide and 10 pixels high, it can set each pixel to black
or white and create the image (See Figure 1.2). The type of data that is
used to provide information, such as the dimensions and resolution of an
image, is called metadata.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• Most images use a lot more colours than black and


white. Each colour has its own binary values.
Colours are created by computer screens using the
Red Green Blue (RGB) colour system. This system
mixes the colours red, green and blue in different
amounts to achieve each colour.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• Each image has a resolution and a colour depth. For example, each colour
could be represented using 8-bit, 16-bit or 32-bit binary numbers (see
Figure 1.3). The greater the number of bits, the greater the range of
colours that can be represented.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• Converting sound to binary


• Sound is made up of sound waves. When sound is recorded, this is done at set time
intervals. This process is known as sound sampling.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• If you recorded the sound at each time sample, you would have the
following set of values:

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• Each sound value is converted to binary to be processed by the computer.


Each sound value is then used to playback the sound, when the recording
is played. If the recorded sound wave is played it would now look like
Figure 1.5:

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• You will notice that the two sound waves look different. This is because the number of samples taken
is too far apart, so vital data in between time samples has been lost. This will result in a lack of
accuracy in the sound that is recorded. Therefore, more samples need to be taken each second to
improve the accuracy of the recorded sound. The number of samples taken in a second is called the
sample rate. Sample rates are measured in hertz. 1 hertz is equal to 1 sample per second. A common
sample rate is 44.1 khz (kilohertz), this would require 44 100 samples to be taken each second. That
is a lot of data! If the sample rate is increased, the amount of data required for the recording is
increased. This increases the size of the file that stores the sound. Further data is required to
represent sound, and this is the sample resolution. This is the number of bits that are used to
represent each sample. A common sample resolution is 16-bit. The higher the sample resolution, the
greater the variations in amplitude that can be stored for each sample. This means that aspects such
as the loudness of the sound can be recorded more accurately. This will also increase the amount of
data that needs to be stored for each sample.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• Sample rate: The number of


samples taken in a second.
Sample rates are measured in
hertz. (1 hertz is equal to 1 sample per
second. A common sample rate is 44.1 khz
(kilohertz), this would require 44 100 samples
to be taken each second.)

• Sample resolution: the number


of bits that are used to record
each sound sample. A common
sample resolution is 16-bit.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

Measuring data storage


• Data is measured using different units, which are shown in Table 1.2.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

Data compression
• You may already have experience of having large files and struggling to
have enough storage space to store them. One thing that can be done to
reduce the size of a file is compression. Compressing a file will reduce
the size of the file that can have several benefits, such as:
• Not as much storage space is needed to store the file.
• It will take less time to transmit the file from one device to another.
• It will be quicker to upload and download the file.
• Not as much bandwidth is needed to transmit the file over the internet

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

• There two type of compression that can be used, lossy and lossless.
• Lossy compression uses a compression algorithm that finds the unnecessary and
redundant data in the file. This data is permanently removed from the file. This type
of compression is mainly used on an image file or a sound file.
• Lossless compression uses a compression algorithm to reduce the size of the file,
without permanently removing any data. A common method that can be used to do
this is by finding repeating data in the file and grouping this data together.

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/


CH01 – Data Representation

CIE IGCSE LEVEL: COMPUTER SCIENCE /0478/

You might also like