Data Representation Aayusha Nagarkoti [ 7921001] BICTE 3 rd semester
Contents Unit 1: Data Representation 1.1 Data Types 1.2 Complements 1.3 Fixed Point Representation 1.4 Floating Point Representation
Data Types Data types in computer architecture and organization refer to the different kinds of data that can be represented and manipulated by a computer. Some common data types include: Integers Floating-point numbers Characters Boolean Arrays Pointers
Data Representation The data can be represented in the following ways: Data Digitalization Binary Digits
Representing Numbers The number can be represented in the following way: Numeric Data Binary Coded Decimal is a 4-bit code used to represent numeric data only. For example, a number like 9 can be represented using Binary Coded Decimal as 10012 . Binary Coded Decimal is mostly used in simple electronic devices like calculators and microwaves.
Representing Text The text can be represented in the following ways: Character Data Digital Devices Extended ASCII Unicode ASCII Code The text can be represented in the following ways:
Representing Bits and Bytes The bits and bytes can be represented in the following ways: Bits and Bytes
Data Compression Lossless Compression compressing the data without any loss of information or data. A file can be restored in its original form. Lossless Compression does not compromise the data’s quality. It does not reduce the size of data. Lossy Compression compressing the data, but that data cannot be recovered 100% of original data. A file does not restore or rebuilt in its original form. Data’s quality is compromised. It reduces the size of data.
Complements Complements are used in digital computers for facilitating the subtraction operation and for logical manipulation. There are two methods of complements for each base r system: the r's complement and the (r - 1)'s complement.
(r - 1)'s Complement 9's complement The 9's complement of 546700 is 999999 - 546700 = 453299 1's complement The 1’s complement of binary number 10101110 = 01010001 . Simply invert each bit of given binary number.
(r's) Complement 10's complement The 10's complement of the decimal 2389 is 7610 + 1 = 7611 and is acquired by inserting 1 to the 9's complement value. 2's complement The 2's complement of binary 101100 is 010011 + 1 = 010100 and is acquired by inserting 1 to the 1's complement value.
Fixed-Point Representation Fixed-point is an elementary and simple method to define factorial numbers. It is a method of representing numbers with a fixed number of integer and fractional bits. It uses a fixed number of bits to represent the number. Fixed-point numbers have a limited range and precision.
Floating Point Representation The floating-point representation can implement operations for high range values. The numerical evaluations are carried out using floating-point values. It uses a variable number of bits. Floating-point numbers can represent a much wider range of values with higher precision.
Example: Convert 111101.1000110 into floating-point value. 111101.1000110 = 1.111011000110 * 2 5 Converted to floating-point value → Denotes negative sign value In this example, the integer value is converted to a floating-point value by changing the radix point next to the signed integer and scaling up the number to the exponential form by multiplying the value with the base 2. The value remains unaltered, and this phase is known as the normalized method.