0% found this document useful (0 votes)
69 views

Representation of Numeric Data in Computer-1

Numeric data in computers is represented using binary digits (bits) that are either 0 or 1. The three main number systems are decimal, which uses 0-9; binary, which uses only 0 and 1; and hexadecimal, which uses 0-9 and A-F. Data is stored internally in computers using binary, while hexadecimal is used as a shorthand for binary. Numbers can be converted between these systems using division or multiplication by their base.

Uploaded by

Anthony Loñez
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

Representation of Numeric Data in Computer-1

Numeric data in computers is represented using binary digits (bits) that are either 0 or 1. The three main number systems are decimal, which uses 0-9; binary, which uses only 0 and 1; and hexadecimal, which uses 0-9 and A-F. Data is stored internally in computers using binary, while hexadecimal is used as a shorthand for binary. Numbers can be converted between these systems using division or multiplication by their base.

Uploaded by

Anthony Loñez
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Representation of numeric data in computer

A. Basic unit of representation in computer


A bit – short form of binary digit, is either a ‘0’ or ‘1’
A byte – group of 8 bits

B. Number systems represented in computer


i) The decimal(denary) number system
- the most commonly used number system in daily life
- consists of digits 0,1,2,3,4,5,6,7,8,9

ii) The binary number system


- consists of digits 0 and 1 only
- all data are represented in binary digits ‘0’ or ‘1’ inside computer
- it is the simplest number system

iii) The hexadecimal number system


- consists of 16 digits, 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
- 4 bits can be represented by 1 hexadecimal digit, therefore it is a shorthand
form to represent binary digits, e.g.
- ‘9’ represents binary digits ‘1001’
- ‘3’ represents binary digits ‘0011’
- ‘A’ represents binary digits ‘1010’
- ‘F’ represents binary digits ‘1111’

C. Conversion of binary number to decimal number


e.g. 1012 = 1x22 + 0x21 + 1x20 = 4 + 0 + 1 = 510
e.g. 10112 = 1x23 + 0x22 + 1x21 + 1x20 = 8 + 0 + 2 + 1 = 1110

D. Conversion of hexadecimal number to decimal number


e.g. 2A16 = 2x161 + 10x160 = 32 + 10 = 4210
e.g. 1AF16 = 1x162 + 10x161 + 15x160 = 256 + 160 + 15 = 43110

E. Conversion of decimal number to binary number


- use short division method, repeatedly divided by 2
e.g. 710 = 1112
e.g. 1410 = 11102

F. Conversion of decimal number to hexadecimal number


- use short division method, repeatedly divided by 16
e.g. 2810 = 1C16
e.g. 25510 = FF16

1
Exercise

1. Convert the following numbers to decimal numbers


(a) 101012

(b) 11112

(c) AB16

(d) 24E16

2. Convert the following numbers to binary numbers


(a) 2910 (b) 10710

3. Convert the following numbers to hexadecimal numbers


(a) 1710 (b) 10010

2
Conversion between binary and hexadecimal

Refer to the table on the right

(a) Convert 7BF16 to binary number


Hexadecimal Binary equivalent
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
(b) Convert 101101011012 to 7 0111
hexadecimal number
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111

You might also like