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

Data Representation Lecture

Here are the answers with odd parity bit added as the least significant bit: - 0100101(1) - 11011(0) Since there is an odd number of 1's in the original bits, the parity bit is set to 1 to make the total number of 1's even. For 11011, the number of 1's is already even so the parity bit is set to 0.

Uploaded by

it20102500
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Data Representation Lecture

Here are the answers with odd parity bit added as the least significant bit: - 0100101(1) - 11011(0) Since there is an odd number of 1's in the original bits, the parity bit is set to 1 to make the total number of 1's even. For 11011, the number of 1's is already even so the parity bit is set to 0.

Uploaded by

it20102500
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

Lecture 02

Data Representation in Computer Systems

IT1020 Introduction to Computer Systems


Part 01 – Computer Fundamentals
Pre-lecture activities

• Data & Information


• Different Types of Data
• ASCII/UNICODE

2
Content

1. Data and Information


2. Data types
3. Data Representation in Computers
4. Error checking
5. Data Compression

3
1. Data and Information
Related terms
What is a System?
• A set of components get together for a particular purpose / to deliver
a common service
• A system has inputs, which will be processed and produced as
output Data Information

What is an InformationProcess
System?
(by software)
• IS is a computer based system to deliver information
• Input: Data
Information System
• Output: Information

4
1. Data and Information
Related terms
Software Engineering
• The engineering discipline of constructing Information
Systems

Information and Communication Technology


(ICT)
• The technology used to engineer ISs

5
1. Data and Information

• Data is a collection of raw facts Saman Kamal


– Numbers Nuwan
Maths English
– Words 50
– Measurements 60 70 80
– Observations 90 40 100
– Description of things

Saman Maths 60
• Information is the processed Kamal Maths 100
outcome of data. Nuwan Maths 40
– It is derived from data Saman English50
Kamal English 70
Nuwan English 80
6
1. Data and Information
What is Information?
• Information provide meaningful values to the
receiver
 Timely - Information should be available when required
 Accuracy - Information should be correct
 Completeness - Information should be complete

7
2. Data Types
Qualitative vs. Quantitative Data
• Quantitative Data : Numerical Information
• Qualitative Data : Descriptive data

Discrete data: Can only take


certain values (within a range)
Continuous Data: Can take any
value (within a range)
8
2. Data Types
Numeric data
• Integer numbers
– Whole numbers, + or -
– 4251 -582

Most significant digit Least significant digit


• Real (Decimal) numbers
– All numbers including everything between integers
– 0.23, 0, 5½, -2.3,

9
2. Data Types
Character Data

Single character Multiple characters


Numeric (String)
0, 1, 2, …… Numeric
349, 53.781, ……
Alphabetic
A, B, C, a, b, c, …… Alphabetic
Cat, Software, ……
Special
#, @, %, (, $, &, ….. Special
(#%$), …..

Alpha-numerical
DIT451789#, ……..
10
2. Data Types
Summary

Data types

Numerical Textual

What are the


Integers
Single
character
Multiple
characters

other data types?


Real Digits

Alphabetical
Numerical

Alphabetical

Special Alphanumerical
11
2. Data Representation

• Data representation refers to the form in which data is


stored, processed, and transmitted
• Devices such as smartphones, iPods, and computers store
data in digital formats that can be handled by electronic
circuitry.
• Digitization is the process of converting information, such
as text, numbers, photo, or music, into digital data that can
be manipulated by electronic devices.

12
2. Data Representation

• The Digital Revolution has evolved through four phases,


beginning with big, expensive, standalone computers, and
progressing to today’s digital world in which small,
inexpensive digital devices are everywhere.

13
3. Data Representation in Computers
How do computers represent data?
• Computers are digital
– Recognize only two discrete states: on or off
– Computers are electronic devices powered by electricity,
which has only two states, on or off
– Binary number system (0,1) is used for processing

1 1 1 1 1

0 0 0 0 0

What is the meaning of “Digital”?


What are the advantages of using binary number system? 14
3. Data Representation in Computers
How do computers represent data?
Example of the use of binary numbers in data
communication
• IP addressing

15
3. Data Representation in Computers
How do we store data in a computer?

16
3. Data Representation in Computers
Binary number system
• The memory is made up of BITS and BYTES
• Single bit can hold a binary digit (0 or 1)
•8 Bits = 1 Byte
210 = 1024
•1024 Bytes = 1KB
•1024 KB = 1 MB 104 KB: Kilobyte (KB or Kbyte)
•1024 MB = 1 GB 50 Mbps: Megabits/sec
•1024 GB = 1 TB
Terminology related to bits and bytes is
extensively used to describe storage capacity and
network access speed.
17
3. Data Representation in Computers
Binary number system
• Each BYTE can be addressed uniquely
• When the address is expressed in Binary, the number of
maximum BITs used to write the address specifies the total
number of locations available
• If n number of BITs are available then the total number of
locations available is 2n
• If we have 32 BITs then we can have 4GB of Memory (232
= 4 GB)

What is the maximum amount of memory for 64bit


computer? 18
3. Data Representation in Computers
BCD (Binary Coded Decimal)
• 4 bit code (for numeric values only)

19
3. Data Representation in Computers
ASCII (American Standard Code for Information Interchange)
 ASCII
– 7 bit code for all 128 characters
– A=1000001
– Fundamentally, computers just deal with numbers. The letters
and other characters are stored by assigning a number for each
one
 Extended ASCII
– This system is an 8-bit system and allows the system to store up
to 256 different characters

20
3. Data Representation in Computers
ASCII

21
3. Data Representation in Computers
Unicode
• Unicode provides a unique number for every character
– no matter what the platform
– no matter what the program
– no matter what the language

How many bits are used to represent a character?


How many characters can be represented? 22
3. Data Representation in Computers
Unicode

23
4. Error checking
Parity
• The parity is used in error checking, to find errors that
may occur during data storing/transmission
• A parity bit is a single bit added to a binary data
transmission used to indicate if whether the 0's and 1's
within that data transmission is an even or odd number

24
4. Error checking
Parity
• There are two modes of parity
– Odd parity:- The number of 1-bits (including the parity bit) must
be an odd number
– Even parity:- The number of 1-bits (including the parity bit) must
be an even number
• A single bit is appended to each data chunk (either as the
least or most significant bit)
– Makes the number of 1 bits even/odd

Example: even parity Example: odd parity


1000000(1) 1000000(0)
1111101(0) 1111101(1)
1001001(1) 1001001(0)
25
4. Error checking
Parity – Example
• You receive a binary word “11000101”
– odd parity is used
– Most significant bit is used for parity

• Is the binary word correct?


• The answer is no:
• There are 4 1-bits, which is an even number
• We are using an odd parity
• So there must be an error.

26
4. Error checking
Parity – Example2
• Assume we are using even parity with 7-bit ASCII.
• The letter V in 7-bit ASCII is encoded as 0110101.

• How will the letter V be transmitted with parity?


 Because there are four 1s (an even number), parity is set to zero.
 This would be transmitted as: 0110101(0).

27
4. Error checking
Parity – Exercises
• Add the odd parity bit as the least significant bit for the
following data
– 0100101 (0)
– 1101101 (0)
– 1011001 (1)
(0)
– 0011010
(1)
– 1111011

28
4. Error checking
Parity – Exercises
• Verify the correctness of the following data with the even
parity bit on the most significant bit
– 01010001 Wrong
– 10100101 Correct
– 01101101 Wrong
Correct
– 01111011
Correct
– 10011010

29
5. Data Compression

• To reduce file size and transmission times, digital


data can be compressed.
• Data compression refers to any technique that recodes
the data in a file so that it contains fewer bits.
• Compression is commonly referred to as “zipping”
• The process of reconstituting zipped files is called
extracting or unzipping.
• Compressed files may end with a .zip, .gz, .pkg,
or .tar.gz
30
Summary

1. Data and Information


2. Data types
3. Data Representation in Computers
4. Error checking
5. Data Compression

31
Thank You

Lecture 02 – Post-lecture activities


Parity & Binary Exercises

Lecture 03
Computer Architecture

Lecture 03 – Pre-lecture activities


Diagram of 8086, Bus Architecture with 3 bus types
32

You might also like