Computer Achitecture and org - Data representation , Study notes of Computer Architecture and Organization

In this document description about Data Representation, Data Types, Complements, Fixed Point Representations, Floating Point Representations, Character Codes.

Typology: Study notes

2010/2011

Uploaded on 09/02/2011

hamit1990
hamit1990 🇮🇳

4.3

(76)

95 documents

1 / 16

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Data Representation
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Computer Achitecture and org - Data representation and more Study notes Computer Architecture and Organization in PDF only on Docsity!

Data Representation

Data Representation

• Data Types

• Complements

• Fixed Point Representations

• Floating Point Representations

• Character Codes

Numeric Data Representation

R = 10 Decimal number system, R = 2 Binary

R = 8 Octal, R = 16 Hexadecimal

Radix point(.) separates the integer

portion and the fractional portion

Data

Numeric data - numbers(integer, real)

Non-numeric data - symbols, letters

Number System

Nonpositional number system

  • Roman number system

Positional number system

  • Each digit position has a value called a weight

associated with it

  • Decimal, Octal, Hexadecimal, Binary

Base (or radix) R number

  • Uses R distinct symbols for each digit
  • Example AR = an-1 an-2 ... a 1 a 0 .a-1…a-m
  • V(AR ) =

n 1

i m

i

i

a R

Fixed Point Representation

Binary Fixed-Point Representation

X = xnxn-1xn-2 ... x 1 x 0. x-1x-2 ... x-m

Sign Bit(xn): 0 for positive, 1 for negative

Remaining Bits(xn-1xn-2 ... x 1 x 0. x-1x-2 ... x-m)

Numbers: Fixed Point Numbers and Floating Point Numbers

Floating Point Number representation

* The location of the fractional point is not fixed to a certain location

* The range of the representable numbers is wide

F = EM

mn ekek-1 ... e 0 mn-1mn-2 … m 0. m-1 … m-m

sign exponent mantissa

  • Mantissa

Signed fixed point number, either an integer or a fractional number

  • Exponent

Designates the position of the radix point

Decimal Value

V(F) = V(M) * RV(E)^ M: Mantissa

E: Exponent

R: Radix

Floating Point Number Representation

sign sign

mantissa exponent

==> +.1234567 x 10+

Example

A binary number +1001.11 in 16-bit floating point number representation

(6-bit exponent and 10-bit fractional mantissa)

Example

Note:

In Floating Point Number representation, only Mantissa(M) and

Exponent(E) are explicitly represented. The Radix(R) and the position

of the Radix Point are implied.

Sign Exponent Mantissa

or

IEEE-754 Floating Point Formats

IEEE-754 Examples

Character Representation ASCII

ASCII (American Standard Code for Information Interchange) Code

0 1 2 3 4 5 6 7 8 9 A B C D E F
NUL
SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
HT
LF
VT
FF
CR
SO
SI
SP
@ A B C D E F G H I J K L M N O

P Q R S T U V W X Y Z [ \ ] m n ‘ a b c d e f g h I j k l m n o P q r s t u v w x y z { | } ~ DEL

DLE
DC
DC
DC
DC
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US
LSB

(4 bits) MSB (3 bits)

Control Character Representation (ASCII)

NUL Null

SOH Start of Heading (CC)

STX Start of Text (CC)

ETX End of Text (CC)

EOT End of Transmission (CC)

ENQ Enquiry (CC)

ACK Acknowledge (CC)

BEL Bell

BS Backspace (FE)

HT Horizontal Tab. (FE)

LF Line Feed (FE)

VT Vertical Tab. (FE)

FF Form Feed (FE)

CR Carriage Return (FE)

SO Shift Out

SI Shift In

DLE Data Link Escape (CC)

(CC) Communication Control (FE) Format Effector (IS) Information Separator

DC1 Device Control 1

DC2 Device Control 2

DC3 Device Control 3

DC4 Device Control 4

NAK Negative Acknowledge (CC)

SYN Synchronous Idle (CC)

ETB End of Transmission Block (CC)

CAN Cancel

EM End of Medium

SUB Substitute

ESC Escape

FS File Separator (IS)

GS Group Separator (IS)

RS Record Separator (IS)

US Unit Separator (IS)

DEL Delete

The EBCDIC control character representation