Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.

Similar presentations


Presentation on theme: "Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control."— Presentation transcript:

1 Data Representation S2

2 This unit covers how the computer represents- Numbers Text Graphics Control

3 Numbers Our number system is called the Decimal or denary number system. We use the digits 0 to 9 to represent any number. We use the column headings – ThousandsHundreds TensUnits 3 2 5 so 325 is made up of 3 hundreds + 2 tens + 5 units 300 + 20+5 =325

4 Computers have their own number system called Binary. They only have 2 digits to represent any number, 0 or 1. 0 = off 1 = on Each 0 or 1 is called a bit. (binary digit) In Binary the column headings are – 1286432168421

5 Converting a binary number to denary Example: Convert 0100 0101 to denary Step 1 – write down column headings 1286432168421 Step 2 – place binary number under correct heading 1286432168421 0100010101000101 Step 3 - Add up all the headings that have a 1 underneath them 64+4+1= 69 ten So, 0100 0101 in denary is 69 ten.

6 Example 2 : Convert 1001 1010 to denary Step 1 – write down column headings 1286432168421 Step 2 – place binary number under correct heading 1286432168421 1 0 0 11010 Step 3 - Add up all the headings that have a 1 underneath them 128+16+8+2= 154 ten So, 1001 1010 in denary is 154 ten.

7 Convert the following binary numbers to denary 1.0000 0011 2.0001 1001 3.0110 0100 4.1000 0010 5.1010 1010 6.1100 1011 7.1110 0011 8.1111 0010 1.3 ten 2.25 ten 3.100 ten 4.130 ten 5.170 ten 6.203 ten 7.227 ten 8. 242 ten

8 Convert the following decimal numbers to binary 1.12 2.25 3.47 4.63 5.88 6.106 7.201 8.254 1.0000 1100 2.0001 1001 3.0010 1111 4.0011 1111 5.0101 1000 6.0110 1010 7.1100 1001 8.1111 1110

9 HOW TEXT IS STORED IN A COMPUTER A binary code is used to represent each character. The code used most often is known as the American Standard Code for Information Interchange – or ASCII. CHARACTER – any symbol or letter on the computer keyboard e.g. c, G, 2, 9, $ are all characters BYTE – a binary code which is made up of eight bits; a byte is used to represent one character.

10 Examples of ASCII codes: CHARACTER CODE R01010010 m01101101 %00100101 +00101011 The word “Hello” would be stored as: H01001000 e01100101 l01101100 o01101111

11 Representing Graphics Graphics (pictures) on the computer screen are made up of tiny dots called pixels. Each pixel may be “on” or “off” depending on whether the value of the pixel in memory is 1 or 0.

12 00 000000 01 11110 0 00 01 0 0 00 0 0 010 0 00 00 01 0000 00 01 0000 00 0 0 0000 00 0 0 0 0 0 0 By writing in the place values above each box, we can calculate the numbers the computer would need to store to be able to show the graphic on screen.

13 00 000000 01 11110 0 00 01 0 0 00 0 0 010 0 00 00 01 0000 00 01 0000 00 0 0 0000 00 0 0 0 0 0 0 128 64 32 16 8 4 2 1 = 0 =64+32+16+8+4=124 =16 =0 For the computer to show this graphic on screen, the following numbers 0, 124, 16, 16, 16, 16, 0, 0 have to be stored in memory.


Download ppt "Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control."

Similar presentations


Ads by Google