Download presentation
Presentation is loading. Please wait.
Published byAnastasia Carpenter Modified over 9 years ago
1
1 3 Computing System Fundamentals 3.5 Data Representation
2
3.5.1 Binary
3
3 Decimal The decimal (base 10) number 287 means ‣ 2 hundreds, ‣ 8 tens and ‣ 7 ones. Each column leftwards represents an increase in magnitude by x10 (powers of 10, i.e. 10 0, 10 1, 10 2...
4
4 Decimal The decimal number 7451: MSD = most significant digit LSD = least significant digit. MSD LSD Thousands HundredsTensOnes 10 3 10 2 10 1 10 0 7451
5
5 Binary Counting in tens is an accident of evolution (most of us have 10 fingers). Computers are built from millions of on/off switches, so it is more logical for them to work in base 2 (binary). The only allowed digits are 0 and 1 (binary digits or bits).
6
6 Binary and 64 + 8 + 1 = 73 in decimal MSB = most significant bit. MSBLSB Bit no.76543210 Power of 2 2 7 2 6 2 5 2 4 2 3 2 2 1 2 0 Which is 1286432168421 Number in binary 01001001 Representin g 6481
7
7 Binary As with decimal, a leading zero is usually dropped i.e. 01001001 = 1001001. Subscripting is used to denote the base you are working in: i.e. 73 10 = 1001001 2 If there is no subscript and you are not told the base, assume it is decimal.
8
8 Uses of binary ASCII (American Standard Code for Information Interchange) is a binary code used to represent characters. Each letter, digit and symbol is represented by a unique code e.g. 01000001 is the capital letter A, (represented as the decimal number 65 in a table of ASCII characters).
9
9 Uses of binary In standard ASCII, only the first 7 bits are used so the LSB can be used as a parity bit when characters are transmitted across a network. This allow 2 7 = 128 combinations and therefore 128 keyboard characters, which is enough for the common western European languages.
10
10 Uses of binary To accommodate non-Latin characters, most operating systems (and Java) now use Unicode, which uses 2 bytes per character. Using 16 bits allows 2 16 or 65 536 possibilities i.e. the more bits you use the greater the range of data you can represent. This is enough to cover other alphabets such as Chinese and Arabic.
11
11 Uses of binary Bit patterns can be used to represent data other than numbers or characters e.g. colours Very old computers might use 4 bit colour i.e. 16 colours in all i.e. every pixel has a 4 bit colour code. 16 bit colour (65 536 colours) is referred to as “thousands of colours”, 32 bit as “millions”.
12
12 Uses of binary Locations in computer memory need their own unique address, which is a binary number. Most PCs use a 32 bit address bus i.e. there are 2 32 or 4 294 967 296 possible memory addresses in the RAM - such computers cannot usually work with more than about 4GB of RAM.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.