# Data Representation

The computer data is made up of ‘bits’ and ‘bytes’. Let’s study some different type of terms used in data representation.

1. Bit: The bit is a basic unit of information in computing and digital communications. A bit can have only one of the two values (0 or 1).
2. Nibble: A nibble contains four bits, there are sixteen (24) possible values in a nibble.
3. Byte: The byte is a unit of digital information that most commonly consists of eight bits.
4. Kilobyte: A kilobyte is a unit of information or computer storage equal to 1024 bytes. It is commonly known as KB.
5. Megabyte: A megabyte is a unit of information or computer storage equal to approximately one million bytes. It is commonly abbreviated as MB.
6. Gigabyte: A gigabyte is a unit of information or computer storage equal to approximately one billion bytes. It is commonly abbreviated s GB.
7. Terabyte: A terabyte is a unit of information or computer storage equal to approximately one trillion bytes. It is commonly abbreviated as TB.

## Decimal Number System

A Decimal usually refers to the base 10 numeral system. Decimal notation consists of (0,1,2,3,4,5,6,7,8,9). Decimal is the most common numeral system used around the world.

## Binary Number System

The binary numeral system represents numeric values using two symbols, mainly 0 and 1. Computer only understands the binary number system.

## Octal Number System

The octal number system is the base-8 number system and uses the digits 0 to 7. We can change octal number to binary number by given method. i.e. if we want to change  6 in binary number then it will be 110. More e.g. 112 will change into 1001010.

Octal                     Binary

1                         000

2                         001

3                         010

4                         011

5                         100

6                         101

7                         110

8                         111

The hexadecimal number system is the base-16 number system and uses the digits 0 to 9 and A-F. we can change binary number to hexadecimal number by given method. i.e. 01001111 can be written as 4F (4= 0100, F= 1111).

## Relation between Decimal, Binary, Octal and Hexadecimal

0                                       0                           0                           0

1                                       1                           1                           1

2                                       10                         2                           2

3                                       11                         3                           3

4                                       100                       4                           4

5                                       101                       5                           5

6                                       110                       6                           6

7                                       111                       7                           7

8                                       1000                     10                         8

9                                       1001                     11                         9

10                                     1010                     12                         A

11                                     1011                     13                         B

12                                     1100                     14                         C

13                                     1101                     15                         D

14                                     1110                     16                         E

15                                     1111                     17                         F