MGMT 1030 Lecture Notes - Lecture 31: Statistical Hypothesis Testing

23 views2 pages
MGMT 1030 Lecture 31 Notes Overflow
Introduction
Remember, too, that you must check for overflow to make sure that your number is still
in range in the new base.
Here are several eaples of ’s opleet additio ad sutratio
Together with the equivalent decimal results
EXAMPLE
Add 00101101 = 45 00111010 = 58 01100111 = 103 Add the 16- bit numbers
 =  = − = −
Note that the addend 1111111111000101 is the inversion of the value in the example
with eight additional 0s required to fill up 16 bits.
The deial result, −, is foud  ivertig  to 
to get a positive magnitude and adding up the bits.
EXAMPLES Add 01101010 11111101 101100111 +1 01101000 = = = 106 2 104 (end-
around carry)
Sutrat  =  − = 
Changing the sign of the addend by inverting 01101010 10100101 100001111 +1
00010000 =16 (end-around carry)
Add  =  +  =  = −
This is an obvious example of overflow.
The correct positive result, 129, exceeds the range for 8 bits.
Eight bits can store 256 numbers
Splitting the range only allows positive values 0127.
The overflow situation shown in the last example occurs commonly in the computer,
and some high-level languages do not check adequately.
In some versions of BASIC, for example, the sum 16384 + 16386 will show an incorrect
result of − or −.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents