<< Chapter < Page Chapter >> Page >
1 0 0 0 0 0 0 0 0 - 0 0 0 1 1 0 1 1= 1 1 1 0 0 1 0 1

Notice that this result is one plus the one's-complement representation for -27 (modulo-2 addition). What about thesecond value of 0? That representation is

1 0 0 0 0 0 0 0 .

This value equals -128 in two's-complement notation!

1 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0= 1 0 0 0 0 0 0 0

The value represented here is -128; we know it is negative, because the result has a 1 in the MSB.Two's-complement is used because it can represent one extra negative value. More importantly, if the sum of a series oftwo's-complement numbers is within the range, overflows that occur during the summation will not affect the final answer!The range of an 8-bit two's complement integer is [-128,127].

Floating point

Floating point notation is used to represent a much widerrange of numbers. The tradeoff is that the resolution is variable: it decreases as the magnitude of the number increases. In the fixed pointexamples above, the resolution was fixed at 1. It is possible to represent decimals with fixed point notation, butfor a fixed word length any increase in resolution is matched by a decrease in the range of possible values.

A floating point number, F, has two parts: a mantissa , M, and an exponent , E.

F = M * 2 E

The mantissa is a signed fraction, which has a power of two in the denominator.The exponent is a signed integer, which represents the power of two that the mantissa must be multiplied by.These signed numbers may be represented with any of the three fixed-point number formats.The IEEE has a standard for floating point numbers (IEEE 754). For a 32-bit number, the first bit is the mantissa's sign. The exponenttakes up the next 8 bits (1 for the sign, 7 for the quantity), and the mantissa is contained in the remaining 23 bits. The range of values for this numberis ( - 1 . 18 * 10 - 38 , 3 . 40 * 10 38 ).

To add two floating point numbers, the exponents must be the same. If the exponents are different, the mantissa is adjusted until the exponents match.If a very small number is added to a large one, the result may be the same as the large number! For instance, if 0 . 15600 0 * 2 30 is added to 0 . 62500 0 * 2 - 3 , the second number would be converted to 0 . 0000 0 * 2 30 before addition. Since the mantissa only holds 23 binary digits, the decimal digits 625would be lost in the conversion. In short, the second number is rounded down to zero. Formultiplication, the two exponents are added and the mantissas multiplied.

Quantization

Introduction

Quantization is the act of rounding off the value of a signal or quantity to certain discrete levels.For example, digital scales may round off weight to the nearest gram. Analog voltage signals in acontrol system may be rounded off to the nearest volt before they enter a digital controller.Generally, all numbers need to be quantized before they can be represented in a computer.

Digital images are also quantized. The gray levels in a black and white photograph must be quantizedin order to store an image in a computer. The “brightness" of thephoto at each pixel is assigned an integer value between 0 and 255 (typically), where 0 corresponds to black, and 255 to white.Since an 8-bit number can represent 256 different values, such an image is called an “8-bit grayscale" image.An image which is quantized to just 1 bit per pixel (in other words only black and white pixels) is called a halftone image. Many printers work by placing, or not placing, aspot of colorant on the paper at each point. To accommodate this, an image must be halftoned before it is printed.

Questions & Answers

how to create a software using Android phone
Wiseman Reply
how
basra
what is the difference between C and C++.
Yan Reply
what is software
Sami Reply
software is a instructions like programs
Shambhu
what is the difference between C and C++.
Yan
yes, how?
Hayder
what is software engineering
Ahmad
software engineering is a the branch of computer science deals with the design,development, testing and maintenance of software applications.
Hayder
who is best bw software engineering and cyber security
Ahmad
Both software engineering and cybersecurity offer exciting career prospects, but your choice ultimately depends on your interests and skills. If you enjoy problem-solving, programming, and designing software syste
Hayder
what's software processes
Ntege Reply
I haven't started reading yet. by device (hardware) or for improving design Lol? Here. Requirement, Design, Implementation, Verification, Maintenance.
Vernon
I can give you a more valid answer by 5:00 By the way gm.
Vernon
it is all about designing,developing, testing, implementing and maintaining of software systems.
Ehenew
hello assalamualaikum
Sami
My name M Sami I m 2nd year student
Sami
what is the specific IDE for flutter programs?
Mwami Reply
jegudgdtgd my Name my Name is M and I have been talking about iey my papa john's university of washington post I tagged I will be in
Mwaqas Reply
yes
usman
how disign photo
atul Reply
hlo
Navya
hi
Michael
yes
Subhan
Show the necessary steps with description in resource monitoring process (CPU,memory,disk and network)
samuel Reply
What is software engineering
Tafadzwa Reply
Software engineering is a branch of computer science directed to writing programs to develop Softwares that can drive or enable the functionality of some hardwares like phone , automobile and others
kelvin
if any requirement engineer is gathering requirements from client and after getting he/she Analyze them this process is called
Alqa Reply
The following text is encoded in base 64. Ik5ldmVyIHRydXN0IGEgY29tcHV0ZXIgeW91IGNhbid0IHRocm93IG91dCBhIHdpbmRvdyIgLSBTdGV2ZSBXb3puaWFr Decode it, and paste the decoded text here
Julian Reply
what to do you mean
Vincent
hello
ALI
how are you ?
ALI
What is the command to list the contents of a directory in Unix and Unix-like operating systems
George Reply
how can i make my own software free of cost
Faizan Reply
like how
usman
hi
Hayder
The name of the author of our software engineering book is Ian Sommerville.
Doha Reply
what is software
Sampson Reply
the set of intruction given to the computer to perform a task
Noor
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?

Ask