2.
Data Types and Representations
@Topic:
-
Common type of Data
(1) the numbers
that we use in arithmetic computations
(2) the letters
of the alphabet that we use in data processing
(3) a range
of discrete symbols that we use for a variety of purposes.
-
All types of data are
represented in binary-coded form.
-
It is easy to construct
electronic circuit.
2.1
Positional Number Systems
-
e.g. : 724.5
= 7*10^2 + 2*10^1 + 4*10^0 + 5*10^-1
-
Positional notation
:
An
An-1... A1 A0
. A-1 A-2 ... A-m+1
A-m
-
General form :
Anr^n + An-1r^n-1 + ... A1r^1
+ A0r^0 +
. A-1r^-1
+ A-2r^-2 + ... A-m+1r^-m+1
+ A-mr^-m
2.2
Octal And Hexadecimal Numbers
-
Different
Representations (P029A)
-
Binary-Coded
Representations (P029B)
2.3
Number System Conversions
-
Radix
converting equation
D
= Q * r + R (P31 , eq2.2-2.3)
-
Procedure
for conversion r to D (P031)
-
Procedure
for conversion D to r (P032A)
-
e.g.
Binary conversion (P032B)
2.4
Addition And Subtraction Of Binary Numbers
-
Addition
of Binary Digits (P033A)
-
e.g.
Binary Addition (P033B)
-
Add
Procedure (P033C)
-
Subtraction
of Binary Digits (P034A)
-
Sub
Procedre (P034C)
-
e.g.
Binary subtraction (P034B)
2.5
Representation Of Negative Numbers
-
2.5.1 Sign-Magnitude
Representation
Procedure for add & sub of sign-magnitude numbers (P035)
-
2.5.2 Complement
Number System
Digit Complements (P037)
Two's Complement & sign-Magnitude Representations (P038)
One's Complement
Ten's Complement
Nine's Complement
2.6
Two's-Complement Addition And Subtraction
-
2.6.1 Addition
Rules (P38, P39)
-
2.6.2 Subtraction
Rules (P39, P40)
-
Procedure for addition
and subtraction
of radix-complement
numbers (P041)
2.7
Binary Multiplication
-
e.g. 4 bit multiplication
(P042B)
-
Procedure for multiplication
of unsigned binary numbers. (P042)
-
Binary multiplication
(P043)
2.8
Binary Division
2.9
Floating-Point Number Representation
-
Floating-point representation
(P046)
2.10
Binary Codes For Decimal Numbers
-
Common Decimal Codes
(P048)
2.11
Character Codes
-
American Standard Code
for Information Interchange (P050)
2.12
Codes For Error Detection And Correction
-
n-cubes for n = 1,
2, 3 and 4 (P051)
-
2.12.1 Error-Detectiion
Codes
n-cubes
for n = 1, 2, 3 and 4 (P051)
-
2.12.2 Error-Correcting
Codes
Three different
codes. (P053)
Example of an error-correction
code. (P054)
2.13
Hamming Codes
-
Computation of parities
in a 7-bit Hamming code. (P055)
-
Code Words with Four
Information Bits in Minimum-Distance-3 and Minimum-Distance-4 Hamming codes
(P056)
-
Correction procedure
for distance-3 Hamming code. (P057)
2.14
Chapter Summary
-
Discuss
data type
-
Described
fixed and floating point number
-
Described
add , sub, mul , div operation
-
Introduce
Hamming code
2.15
Further Readings
2.16
Problems
-
2.1
(b), 2.5 (d), 2.14 (a), 2.15 (a),
2.16 (a), 2.22 (d),
-
Q
: To generate Hamming code and correct error .
1) If information bit is 1010, find P1,
P2, P4; and 7 bit
Hamming code.
2) If single-bit error in position 3, list
correction procedure.