Digital Information: Limitations of Storing Numbers Flashcards
Integer
any number that can be written without a fractional component
Computers use the same strategies to store memory of all numbers
true or false
false they use diff srategies for integers and no integers
computers represent all data with what
bits
On a computer which uses 6 bits to represent integers (with 1 bit to represent the sign), which of these operations result in overflow?
a) 15 + 15
b) 24 + 6
c) 30 + 1
d) 3 + 29
32 bc the highest number the computer can show is 31
overflow
when a computer cannot represent a value because it is too high
Floating point representation
the strategy does a computer works to represent non integers or integers that are too big for the particular computer to store a number
how does floating point representation work
the number shows up as a number multiplied by a base that is raised to an exponent
what is the base used in floating point representation and why
ALWAYS 2 bc of bits
Roundoff errors
errors where computers that are not precise enough round off numbers (like the ones that go on infinitely 1/3) weirdly so that they make calculations wrong
Precision
how precise a number is represented (how mmany decimal places it can be represented by bits in a computer)
Puseudocode
codes that you cant actually run but are used for planning programs and for thinking about code independently of specific programming language
example of psuedocode
a - b
evaluates the result of b subtracted from a