Docsity

Data Representation: Understanding Quantitative and Qualitative Data in Computer Systems, Study notes of School management&administration

Toggle sidebar
bg1
1
1
Data Representation
CS101-Computer Systems
By:
Dilum Bandara
Dept. of Computer Science & Engineering
University of Moratuwa ©CSE 2
Outline
pTerminology
pMeasuring data
pData representation
nQuantitative
nQualitative
©CSE 3
Terminology
pComputers store & process data
pWhat is data?
pThe processed data is called information
pPhysical devices used to store & process
data in computers are 2-state devices
pState is represented using;
n0 –OFF
n1 -ON
©CSE 4
Bit & Byte
pAn abbreviation for BInary digiT
pBit is the smallest unit of data
representation
pWhen 8 bits are combined together it is
called a byte
p1024 (210) bytes are called a Kilobyte
©CSE 5
Metrics used to measure quantities
of data
-
125,0001000 Kilobits
MbMegabit
-
1251000 bits
KbKilobit
2401,099,511,627,7761024 Gigabyte
TBTerabyte
2301,073,741,8241024 Megabytes
GBGigabyte
2201,048,5761024 Kilobytes
MBMegabyte
21010241024 Bytes
KBKilobyte
2018 bits
ByteByte
-
-
BitBit
Power of 2BytesSymbolAbbreviation
©CSE 6
Data representation
Data
Representation
•Represents quality or
characteristics
•Not proportional to a value
•Name, NIC no, index no,
Address
•Quantifiable
•Proportional to value a
•Number of students, marks
for CS101, GPA
Qualitative
Quantitative
pf3
pf4
pf5

Partial preview of the text

Download Data Representation: Understanding Quantitative and Qualitative Data in Computer Systems and more Study notes School management&administration in PDF only on Docsity!

1

Data Representation

CS101 - Computer Systems

By: Dilum Bandara Dept. of Computer Science & Engineering University of Moratuwa © CSE 2

Outline

p Terminology

p Measuring data

p Data representation

n Quantitative

n Qualitative

© CSE 3

Terminology

p Computers store & process data

p What is data?

p The processed data is called information

p Physical devices used to store & process

data in computers are 2-state devices

p State is represented using;

n 0 – OFF

n 1 - O N

© CSE 4

Bit & Byte

p An abbreviation for BInary digiT

p Bit is the smallest unit of data

representation

p When 8 bits are combined together it is

called a byte

p 1024 (

) bytes are called a Kilobyte

© CSE 5

Metrics used to measure quantities

of data

Megabit Mb 1000 Kilobits 125,000 -

Kilobit Kb 1000 bits^125

Terabyte TB 1024 Gigabyte 1,099,511,627,776 240

Gigabyte GB 1024 Megabytes 1,073,741,824^30

Megabyte MB 1024 Kilobytes 1,048,576 220

Kilobyte KB 1024 Bytes 1024 210

Byte Byte 8 bits^120

Bit Bit - -

Abbreviation Symbol Bytes Power of 2

© CSE 6

Data representation

Data

Representation

  • Represents quality or

characteristics

  • Not proportional to a value
  • Name, NIC no, index no,

Address

•Quantifiable

•Proportional to value a

•Number of students, marks

for CS101, GPA

Qualitative

Quantitative

© CSE 7

Quantitative data

© CSE 8

Data representation in computers

p Data is stored as Registers

p Register is a series of switches

p Registers are limited in size

n So number of bits are limited

n-1 n-2 … ... ... 2 1 0

n-bits

ß Min value - 0

ß Max value - 2n-

© CSE 9

Unsigned Integers

p Only the positive numbers

p With a single byte (8-bits)

n We can denote 2^8 (256) numbers

n 0 (00000000 2 ) is the minimum

n 255 (11111111 2 ) is the maximum

© CSE 1 0

Binary addition

p In order to perform arithmetic operations

all operands should be in the same

number base

p Example:

n Add 01010 2 and 10001 2

n Answer = 11011 2

© CSE 1 1

Example

p Add 111110 2 and 11000111 2

n You are given only 8-bit registers

111110 ‡ 00111110

11000111 + ‡ 11000111 +

100000101 ‡ 00000101

Carry bit

Overflow

© CSE 1 2

Signed Integers

p Denote whole numbers with are both

positive & negative

p Representing sign integers

n Sign & Magnitude method (S&M)

n Bias notation

n Complement method

© CSE 1 9

Character representation cont …

p With a single byte (8-bits) 256 characters

can be represented

p Standards

n ASCII - American Standard Code for

Information Interchange

n EBCDIC - Extended Binary-Coded Decimal

Interchange Code

n Unicode

© CSE 2 0

ASCII

p De facto world-wide standard for the code

numbers used by computers to represent:

n upper & lower-case Latin letters

n Numbers

n Punctuations

p There are 128 standard ASCII codes

n Can be represented by a 7 digit binary

number: 000 0000 through 111 1111

© CSE 2 1

ASCII table

NUL

SOH

STX

ETX

EOT

ENQ

ACK

BEL

BS

TAB

LF

VT

FF

CR

SO

SI

A

B

C

D

E

F

Hex Symbol

ASCII

(space) ! "

$ % & ' ( ) * + , -.

2A

2B

2C

2D

2E

2F

ASCII Hex Symbol 0 1 2 3 4 5 6 7 8 9 : ; < = >

3A

3B

3C

3D

3E

3F

ASCII Hex Symbol

© CSE 2 2

ASCII table cont…

A

B

C

D

E

F

G

H

I J K L M N

O

4A

4B

4C

4D

4E

4F

ASCII Hex Symbol P Q R S T U V W X Y Z [ \ ] ^

_

5A

5B

5C

5D

5E

5F

ASCII Hex Symbol ` a b c d e f g h i j k l m n

o

6A

6B

6C

6D

6E

6F

ASCII Hex Symbol

© CSE 2 3

ASCII - things to note

p ASCII codes for digits are not equal to the

numeric value

p A simple code set & supported by almost

every computer

p But, most languages need more than 128

characters

© CSE 2 4

Unicode www.unicode.org

p Is designed to overcome the limitation of number

of characters

p Assigns unique character codes to characters in a

wide range of languages.

p A 16-bit character set

p 65,536 (

) distinct Unicode characters

p Unicode provides a unique number for every character,

no matter what the platform,

no matter what the program,

no matter what the language.

© CSE 2 5

Unicode cont…

p Even

supports

Sinhala &

Tamil

Courtesy by Unicode.org

© CSE 2 6

Summary

p Measuring data

p Data representation

n Quantitative

p Integers

ß Unsigned

ß Signed

p Non integers

n Qualitative