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

Data Representation Notes

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Data Representation Notes

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

DATA REPRESENTATION

• This refers to the form in which data is stored,


processed, and transmitted. The 0s and the 1s
used to represent digital data are referred to as
binary digits. Devices such as smartphones,
iPods, and computers store data in digital
formats that can be handled by electronic
circuitry.
DATA TYPES
• Data type refers to the type of value a variable
has and what type of mathematical, relational
or logical operations can be applied without
causing an error. For example, many
programming languages use the data
type string to classify text, integer to identify
whole numbers and floating point to designate
numbers with decimal points.
DATA TYPES CLASSIFICATION
• Integer (int): This is used to represent whole
numbers.
• String (str or text): This used for alphanumeric
characters or combination of any characters that
appear on a keyboard such as letters, numbers and
symbols.
• Characters (char): This is used for single letters.
• Float: This used for numbers with a decimal point.
• Boolean (Bool): This used where data is restricted
to True/False or Yes/No options.
UNITS OF DATA STORAGE
• Bit: This a binary digit (0 or 1). It is the smallest unit of
data the computer can process or hold. It hold ONE of
TWO possible values.
• Byte: This is a group of bits (8 bits) used to represent a
character. A byte is considered as the basic unit of
measuring memory size in computer.
• Nibble: This is half a byte, which is usually a group of 4
bits.
• Word: This is a 2-byte (16-bit) data item. This can be any
number of bits or bytes.The term word length is used as the
measure of the number of bits in each word. For example, a
word can have a length of 16 bits, 32 bits, 64 bits etc.
UNITS OF DATA STORAGE
Byte Value Bit Value Possible Values

Bit 0 or 1

Nibble 4 Bits 2^4=16

Byte 8 Bits 2^8=256

1024 Bytes 1 Kilobyte 2^10=1024

1024 Kilobytes 1 Megabyte 2^20

1024 Megabytes 1 Gigabyte 2^30

1024 Gigabyte 1 Terabyte 2^40


DATA REPRESENTATION OF CHARACTERS
(CHARACTER ENCODING SCHEMES)
• American Standard Code for Information Interchange
(ASCII): This uses 7 bits to represent each character in
computer memory. It specifies character from 0 to 127,
2^7 (128 characters). This number called ASCII code of
character is converted into binary for storing in memory.
For example, the ASCII code of A is 65, its binary
equivalent in 7-bit is 1000001.
• Another version is ASCII-8, also called extended ASCII,
which uses 8 bits for each character, can represent 256
different characters. For example, the letter A is
represented by 01000001, B by 01000010 and so on.
DATA REPRESENTATION OF CHARACTERS
(CHARACTER ENCODING SCHEMES)

• Extended Binary Coded Decimal


Interchange Code (EBCDIC): This 8 bit
code used in computers manufactured by
International Business Machine (IBM). It is
capable of encoding 256 characters. If ASCII
coded data is to be used in a computer that
uses EBCDIC representation, it is necessary to
transform ASCII code to EBCDIC code or the
vice versa.
DATA REPRESENTATION OF CHARACTERS
(CHARACTER ENCODING SCHEMES)

• Unicode: Using 8-bit ASCII we can represent


only 256 characters. This cannot represent all
characters of written languages of the world
and other symbols. Unicode is developed to
resolve this problem. It aims to provide a
standard character encoding scheme, which
is universal and efficient. It provides a unique
number for every character, no matter what the
language and platform be.
NUMBER SYSTEM
• A number system is a set of symbols used to
represent values derived from a common base or
radix. The various types are:
• Decimal Number System: The term decimal is
derived from a Latin prefix deci, which means
ten. It has ten digits ranging from 0-9 and
because this system has ten digits; it is also
called a base ten number system or denary
number system. A decimal number should
always be written with a subscript 10 e.g. X 10
NUMBER SYSTEM
• Binary Number System: It uses two digits
namely, 1 and 0 to represent numbers. Unlike
in decimal numbers where the place value
goes up in factors of ten, in binary system, the
place values increase by the factor of 2. Binary
numbers are written as X2. Consider a binary
number such as 10112.The right most digit has
a place value of 1×20 while the left most has a
place value of 1×23.
NUMBER SYSTEM
• Octal Number System: Consists of eight digits
ranging from 0-7.the place value of octal numbers
goes up in factors of eight from right to left.
• Hexadecimal number system: This is a base 16
number system that consists of sixteen digits
ranging from 0-9 and letters A-F where A is
equivalent to 10, B to 11 up to F which is equivalent
to 15 in base ten system. The place value of
hexadecimal numbers goes up in factors of sixteen.
A hexadecimal number can be denoted using 16 as a
subscript or capital letter H to the right of the
number.
NUMBER SYSTEM
SYSTEM BASE DIGITS

Binary 2 0,1

Octal 8 0, 1, 2, 3, 4, 5, 6, 7

Decimal 10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Hexadecimal 16 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
NUMBER SYSTEM (ONE TO ONE COMPARISON)

You might also like