# DATA PRESENTATION IN A COMPUTER

# DATA PRESENTATION IN A COMPUTER

**Brief Description**

Computers are classified according to Functionality, physical size and purpose.

According to** functionality**, computers can be analog, digital or hybrid.

Digital computers produce data that is in discrete form, analog computers process data in that is in continuous in nature while hybrid computers process both discrete and continuous data.

In digital computers , the user input is first converted and transmitted as eklecrical pulses that can be represented by two distinct states ONE and OFF.

Analog and Digital Signal

Graphically they look different in their appearance, they repeat themselves at equal time interval. The electrical signal or waveform of this nature are said to be periodic. A periodic wave representing a signal is described using THREE PARAMETERS

Amplitude (A)

Frequency (f)

Periodic Time (T)

Amplitudes (A)

This is the maximum displacement that the waveform of electrical signal can attain.

Eg

**Frequency** (f)

This is the number of circles made by the signal in one second.

It is measures in units called hertz (hz) which is equivalent to 1 cycle / second.

**Periodic time (T)**

The time taken by the signal to complete one cycle and is given by the formula T = I/F, where f is the frequency of the wave.

When a digital signal is sent over an analog telephone line eg E-mail, it has to be converted to analog signal. This is done by connecting a device called **MODEM (Modulator/Demodulator) t**o the computer.

**Role of MODEM**

A **MODEM** converts (modules) data from digital to analogue form to be transmitted

over the telephone ling. At the receiving end, the modem attached to the

receiving computer converts (**demodulates**)the analogue signal back to the original digital form.

**Reasons for using binary in digital technology. **

- It is easier to develop devices that understand binary language

- Devices designed using binary logic are simple, more reliable & consume less

energy.

**Terminogies as used in data representation. **

ii) Byte - A group/collection of 8 bits used to represent a character.

iii) Nibble - a group of four binary digits usually representing a numeric

value

iv) word - The total number of bits that a single register of a particular

machine can hold

**TYPES OF DATA PRESENTATION**

Is the better way of handling complex types of data ( long streams of binary digits). Higher number systems are used in computing to reduce the streams of binary into manageable form, thus helps to improve the processing speed and optimize memeory usage.

**CATEGORIES OF NUMBERS SYSYTEM**

- Decimal Number system
- Binary Number system
- Octal Number system
- Hexadecimal Number system

**DECIMAL NUMBER SYSTEM **

Decimal ( deci) means ten

Has ten digits ranging from 0 – 9 because the system has ten digit.

Also called base ten or denary number system and written with subscript 10 i.e x _{10}

**BINARY NUMBER SYSTEM**

Uses two digits namely 1 and 0

The place values increases by factors of two

Written as base two i.e x _{2}

Consider a binary number such as 10011_{2}, the right most digit has a place value of 2 x 1^{0} while the left most has a place value of 2 x 1^{3}

Place Value (2 |
Eights 2 |
Four 2 |
Twos 2 |
Ones 2 |

Binary digit |
1 |
0 |
1 |
1 |

**OCTAL NUMBER SYSTEM**

Uses eight bits running from 0 – 7

The place value go up in factors of eight from right to left

Example. – 7245_{8}

Place Value (8 |
8 |
8 |
8 |
8 |

Binary digit |
7 |
2 |
4 |
5 |

NB

The decimal equivalent of 72458 is

N_{10} = (7x8^{3}) + (2x8^{2}) + (4x8^{1}) + (5x8^{0})

= (7x512) + (2x64) + (4x8) + (5x1)

= 3584 + 128 + 32 + 5

= 3749_{10}

**HEXADECIMAL NUMBER SYSTEM**

It is radix of sixteen (16)

Uses 16 digits ranging from 0 – 9 and letters A to F. A is equivalent to 10 while F is equivalent to 15.

The place value goes up in factors of sixteen (16) from right to left

Example 1

Convert 111_{16} to Decimal equivalent

Solution

16 |
16 |
16 |

1 |
1 |
1 |

**Example 2**

Convert A916 to its decimal equivalent

**Solution **

16 |
16 |

A |
9 |

A = 10 - 10 x 16^{1} = 160

1 = 1 - 1 x 16^{0} = 9

Ad the two – 160 + 9 = 169

Therefore A9^{16} = 169_{10}

**Uses of hexadecimal notation in a computer.**

Helps to manage long binary digit properly

Helps to improve the processing speed and optimize memory usage.

**BINARY ARITHMETIC OPERATION**

**Representation of signed binary numbers**

**Ways of representing binary number (positive) or (negative)**

**Prefixing an extra sign bit to binary****Using ones complement****using two complement**

**Prefixing an extra sign bit to a binary number**

A signed number has a prefix + for positive number and represented by prefixing a digit

0 and a negative number represented by prefixing a digit 1

**USING COMPLEMENT**

**One’s compliment to solve the following the following sum: - 5 _{10}**

2 |
5 |
Rem |

2 |
2 |
1 |

2 |
1 |
0 |

1 |
1 |

**Perform the following Binary arithmetic:**

** 11100111 + 00101110 **

11100111

00101110 +

(1) 00010101 =100010101_{2}