1.5 Digital representation of data
People have always communicated with each other and exchanged information.
In prehistoric times, data was represented on cave walls in the form of rock
carvings and paintings. Information could be communicated only over small
distances. The representation of data has undergone many changes since prehistoric
times. Today, information technology is changing our methods of representing
data. For any kind of data to be stored and processed on a computer, it
must be stored digitally. The recorded music industry shifted to digital format in
the late 1980s when compact discs (CDs) replaced vinyl records.

 

Traditional methods of representing data
To appreciate the benefits of digital data, it helps to be aware of some of the
traditional methods used to represent and store data.
• Filing systems: Data is filed into a filing cabinet or storage area. Individual
pieces of paper are manually sorted so that information is readily obtainable.

Traditional methods of representing data
To appreciate the benefits of digital data, it helps to be aware of some of the
traditional methods used to represent and store data.
• Filing systems: Data is filed into a filing cabinet or storage area. Individual
pieces of paper are manually sorted so that information is readily obtainable.

 

Digitising trends
Data is represented digitally so that it can be used by information technology.
This allows data to be processed faster and more easily than ever before. People
and organisations have an increasing appetite for information. Information
technology has allowed more information to be collected, stored and processed.
The use of information technology and digital data offers many advantages over
other methods of representing data.
• Ease of editing: Data in the form of images, audio, video, text and numbers,
can be easily updated and modified as required.
• Ease of storage: Large amounts of data can be stored on a disk or CD. It can
be retrieved, revised and rearranged as appropriate.
• Quick search: Large amounts of data can be searched and sorted quickly and
accurately.
• Performing calculations: Precise and complex calculations can be performed
on the data very quickly. Recalculations of the data assist with predictions
and decision-making.
• Ease of transmission: Data can be easily exchanged. The Internet provides a
convenient way of accessing information throughout the world.

 

Balanced against these advantages, there are disadvantages in the use of
information technology and digital data.
• The cost of hardware, software and installation may be prohibitive.
• Compatibility with existing technology must be investigated.
• The participants in the information system need to be trained. People are
often reluctant to adopt new methods.
• Social and ethical issues such as privacy, security, copyright and the changing
nature of work need to be addressed. (These issues are examined in Chapter 2.)
Despite these disadvantages, people and organisations are adopting information
technology and digital data at an extraordinary rate. Some of the more
recent trends include electronic newspapers, Internet banking, electronic commerce
and Internet shopping.
Electronic newspapers allow people to access information on stories of
special interest. They provide the latest news, as the stories are being constantly
updated. Subscribers are emailed a page of news headlines on the areas they
nominate. Each item of text is linked to a full story on a Web site.

 

Internet banking allows customers
to view their account balances and
transaction histories, transfer money
between accounts, and pay bills over
the Internet. It provides banking
services 24 hours a day but cannot
cater for cash withdrawals.
Electronic commerce allows commercial
transactions to be carried out
electronically using a credit or debit
card instead of cash. It provides an
efficient service to customers and has
been quickly adopted by many Australians.
Internet shopping allows organisations
to sell their goods and services
on a global scale (see Figure 1.17). It
is gaining acceptance even though
some people are concerned about the
security of their credit card details.

 

Digital data
Digital data is data that is represented using digits (numbers). The computer is a
two-state device that uses only two digits: 0 and 1. Two digits are easily
represented electronically by circuits in the computer being either on or off. The
digit 1 is used to represent the electronic state of ‘on’ and the digit 0 is used to
represent the electronic state of ‘off’. Each on or off digit is called a bit (binary
digit). A bit is the smallest unit of data stored in a computer.
A group of eight bits is called a byte. A byte is the basic unit of measurement
for digital data. Using eight bits means that there are 256 possible values for a
byte (00000000, 00000001, etc.). When used to represent text, a byte stands for
a single character, such as a letter, a number, a punctuation mark or a space.
Because a byte is such a small unit, the prefixes ‘kilo’, ‘mega’, ‘giga’ and ‘tera’ are
added to create more useful units for measuring data storage (see Table 1.2).

 

The binary system
The normal system we use for counting is called the decimal system. It is an
arithmetic system using a base of 10 (the digits 0 to 9). The system of counting
used by computers is called the binary system (or binary code). It is an
arithmetic system using a base of two (the digits 0 and 1). Like the decimal
system, the binary system uses place value to determine the worth of a digit.
However, whereas the decimal system uses powers of ten (10, 100, 1000, etc.),
the binary system uses powers of two (2, 4, 8, etc.) for its place values. A subscript
is used to distinguish between numbers with different bases. For example,
102 is the number ‘one zero’ in the base two (binary) system.
To change a binary number into a decimal number, we add the appropriate
place values, as shown in the example below.


Example
Convert the binary number 1001110 into a decimal number.

 

So, binary number 100110 equals decimal number 78.
To change a decimal number into a binary number, we divide the binary
place values into the decimal number. The result of the division is the binary
digit, and the remainder is divided by the next place value. This process is
repeated for all place values.
Example
Convert 109 in decimal into binary.

 

So, decimal number 109 equals the binary number 1101101.

 

The hexadecimal system
Binary numbers are ideal for computers but very difficult for people. Because
they use only two digits, they result in very long strings of 1s and 0s. For this
reason, many computers represent binary numbers in hexadecimal. The
hexadecimal number system, or hex, is to the base 16, and uses the sixteen
digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. The numbers are often
preceded by the $ (dollar) sign to indicate that they are in hexadecimal code. So
$A = 10 , $B = 11, and so on. Because 16 is 2 to ther power 4, it is very easy to convert
binary numbers to hexadecimal and vice versa.

 

To change a hexadecimal number into a decimal number, we add the
appropriate place values, as shown in the example below.
Example
Convert 1B05 base 16 into a decimal number.

So, hexadecimal 1B05 equals the decimal number 6917.
To change a decimal number into a hexadecimal number, we divide the
hexadecimal place values into the decimal number. The result of the division is
the hexadecimal digit, and the remainder is divided by the next place value. This
process is repeated for all place values, as shown in the next example.

 

ASCII and EBCDIC
To be used in a computer, all data needs to be converted into a binary number.
To ensure data from one computer can be used on another, there needs to be a
standard method of converting letters, numbers, characters and instructions into
binary code. Two commonly used coding methods are ASCII and EBCDIC.

The standard coding method used on personal computers is called ASCII
(pronounced ‘ass-kee’), which stands for the American Standard Code for Information
Interchange. ASCII is a system for changing letters, numbers and
symbols into a 7-bit code. For example, the letter ‘K’ is converted to the decimal
number 75 using the ASCII code, and this number is then converted to the
binary number 1001011, which can be stored by the computer. Seven-bit ASCII
allows for 128 different characters (27), including 96 standard keyboard
characters and 32 control characters. The keyboard characters include 26 upper
case letters, 26 lower case letters, 10 digits and 34 symbols (the complete code is
given in the Appendix). The control characters are used for computer functions
such as ‘carriage return’ and ‘form feed’.
The standard seven-bit ASCII was designed when computers were not
extensively used outside the US and UK. However, it is a problem with many
languages other than English. Many European languages include accent marks
and special characters that cannot be represented by standard ASCII. Several
larger character sets such as extended ASCII use eight bits, which gives 128
additional characters. The extra characters are used to represent non-English
characters, graphic symbols and mathematical symbols. Because there are a
number of different extended character sets, they are not always interchangeable
between different computer systems.
A coding method used on large IBM computers is called EBCDIC (pronounced
‘ebb-see-dick’). It stands for Extended Binary Coded Decimal Interchange
Code and was adapted by IBM from punched card code in the 1960s.
There exist at least six different versions, with one version of EBCDIC containing
all the characters of ASCII. This allows data to be translated between the
two codes. EBCDIC is a system that changes letters, numbers and symbols into
an 8-bit code. This allows for 256 (28) different characters (the complete code is
given in the Appendix). For example, the letter ‘A’ is converted to the decimal
number 193 using the EBCDIC code, and this number is then converted to the
binary number 11000001, which can be stored by the computer.

Exercise 1.5

 

1 Describe some of the traditional methods used to represent and store data.
2 What are the advantages and disadvantages of digital data?
3 Describe four digitising trends.
4 What is a byte?
5 Why do computers represent data using only two digits?
6 Convert these measurements to the units indicated (approximate value only).
a 2 Mb = b b 160 Kb = b
c 3 000 000 b = Mb d 4 Gb = b
e 560 Mb = Kb f 8000 Kb = Mb
7 List two commonly used coding methods for digital data.
8 How many different characters can be represented using a 7-bit ASCII?
9 Why was extended ASCII developed?
Answer questions 10 to 13 using the Appendix.

10 What is the ASCII code in binary for the following characters?
a B b m
11 What is the ASCII code in hexadecimal for the following characters?
a $ b DEL
12 What is the EBCDIC code in binary for the following characters?
a g b ?
13 What is the EBCDIC code in hexadecimal for the following characters?
a @ b 7

Learning Activities