IT UNIT 2 PT 1 Notes
IT UNIT 2 PT 1 Notes
Data Representation
Introduction
• Data representation is the process of converting information into a form that
can be stored, processed, and transmitted by a computer.
• It involves the use of various data structures and encoding schemes to
represent different types of data, such as numbers, text, images, and sound.
• Data representation is a fundamental topic in computer science.
• It is used in a variety of applications, such as programming, database
management, and networking.
• Understanding how data is represented is essential for designing and
implementing efficient and reliable software systems.
Data Representation
Introduction
• In Digital Computer, data and instructions are stored in computer memory using
binary code (or machine code) represented by Binary digits 1 and 0 called BIT’s.
The data may contain digits, alphabets or special character, which are converted
to bits, understandable by the computer.
• The number system uses well defined symbols called digits.
• Number systems are basically classified into two types.
• They are:
• Non-positional number system
• Binary code: A binary code is a system that represents numbers and other data
using only two symbols, 0 and 1. It is the most common data representation
format used in computers.
• Decimal: The decimal system is a number system that uses ten digits, 0 to 9, to
represent numbers. It is the most common number system used by humans.
• Decimal: The decimal system is a number system that uses ten digits, 0 to 9, to
represent numbers. It is the most common number system used by humans.
Note:
If the number is less than 8 the
octal number is same as decimal
number.
Note:
If the number is less than 8 the
octal number is same as decimal
number.
Therefore, 0.3125(10) = 0.24(8)
Number System Conversions
Conversion from Octal to Decimal :
Steps to convert octal number to decimal number
Note:
If the number is less than 16 the
hexadecimal number is
same as decimal number.
Note:
To make group of 3 bits, for
whole numbers, it may be
necessary to add a 0’s to the
left of MSB and when
representing fractions, it may
be necessary to add a 0’s to
right of LSB.
Number System Conversions
Conversion from Octal to Binary :
Steps to convert octal to binary
• Step 1: Take the each digit from octal number
• Step 2: Convert each digit to 3-bit binary number. (Each octal digit is
represented by a three bit binary number as shown in Numbering System
Table)
Number System Conversions
Conversion from Octal to Binary :
Number System Conversions
Conversion from Binary to Hexadecimal :
Steps to convert Binary to Hexadecimal
• Error detection techniques are responsible for checking whether an error has
occurred or not in the frame that has been transmitted via the network. It does
not take into account the number of error bits and the type of error.
• For error detection, the sender needs to send some additional bits along with the
data bits. The receiver performs necessary checks based upon the additional
redundant bits. If it finds that the data is free from errors, it removes the
redundant bits before passing the message to the upper layers.
Data Representations
Error-detecting codes
• Error-detecting codes are a sequence of numbers generated by specific
procedures for detecting errors in data that has been transmitted over computer
networks.
• When bits are transmitted over the computer network, they are subject to get
corrupted due to interference and network problems. The corrupted bits leads to
spurious data being received by the receiver and are called errors.
• Error – detecting codes ensures messages to be encoded before they are sent
over noisy channels. The encoding is done in a manner so that the decoder at the
receiving end can detect whether there are errors in the incoming signal with
high probability of success.
Data Representations
Features of Error Detecting Codes
• Error detecting codes are adopted when backward error correction techniques
are used for reliable data transmission. In this method, the receiver sends a
feedback message to the sender to inform whether an error-free message has
been received or not. If there are errors, then the sender retransmits the
message.
• Error-detecting codes are usually block codes, where the message is divided into
fixed-sized blocks of bits, to which redundant bits are added for error detection.
• Error detection involves checking whether any error has occurred or not. The
number of error bits and the type of error does not matter.
Data Representations
Error Detection Techniques
• There are three main techniques for detecting errors
• Parity Check
• Checksum
• Cyclic Redundancy Check (CRC)
Data Representations
Parity Check
• Parity check is done by adding an extra bit, called parity bit to the data to make
number of 1s either even in case of even parity, or odd in case of odd parity.
• While creating a frame, the sender counts the number of 1s in it and adds the
parity bit in following way
• Odd Parity − Here the total number of bits in the message is made odd.
Data Representations
Error Detection by Parity Check
• Sender’s End − While creaDng a frame,
the sender counts the number of 1s in it
and adds the parity bit the value of
which is determined as follows -