Biomedical Engineering Reference
In-Depth Information
Digital Codes : The next problem is to code the numbers from the ADC to a format
suitable for further computation. So what are the most common formats used in digital
processing of fixed points? If one thinks about it, 2 n different numbers can be represented
by an n -bit digital word. The position of the binary point is assumed fixed. Bits to the
left of the point represent the integer part. Bits to the right of the point represent the
fractional part.
There are three common fixed-point formats for representing negative numbers.
1.
Sign magnitude : The left most bit (most significant bit) represents the sign of the
number, and the remaining bits ( n
1) represent the magnitude of the number.
A well-known problem is that in a 4-bit sign magnitude, both the codes 1000
and 0000 represent the value of 0.
2.
One's compliment : Positive numbers are represented in sign magnitude format.
The negative of a number is obtained by complimenting all the bits of the
number, the negative of 0101 is 1010. But again, there are two representations
for 0, which are 0000 and its compliment 1111.
3.
Two's compliment : The representation depends on the sign of the number.
a) Positive numbers are represented in sign-magnitude format.
b) Negative numbers are represented in two's compliment.
To obtain the two's compliment requires two operations; first, take the one's com-
plements, and then add 1 to the least significant (right most) bit. For example, The
negative of 0101
1011. Zero (0) is then 0000 (only one representation), with the
largest positive number being 0111 for n
=
=
4, while the largest negative number
is 1000.
6.4 DIGITAL FORMAT
6.4.1 Floating Point Format
Floating point representation of a number consists of two fixed-point numbers repre-
senting a mantissa and an exponent. The floating-point number, n , is the product of
Search WWH ::




Custom Search