Difference between revisions of "CSC231 Homework 6 2015"
Line 63: | Line 63: | ||
=Problem #2= | =Problem #2= | ||
<br /> | <br /> | ||
− | Assume that we want to compute the [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci] series with a compiled program. | + | Assume that we want to compute the [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci] series with a compiled program written in a language that supports signed and unsigned ints, in 8-, 16-, 32-, and 64-bit length. |
* How many terms can we correctly display if we use unsigned chars (8 bits) to store the Fibonacci terms? | * How many terms can we correctly display if we use unsigned chars (8 bits) to store the Fibonacci terms? | ||
Line 69: | Line 69: | ||
* How many terms if we use unsigned short ints (16 bits)? | * How many terms if we use unsigned short ints (16 bits)? | ||
− | * How many terms if we use | + | * How many terms if we use unsigned ints (32 bits)? |
* How many terms if we use long unsigned ints of 64 bits? | * How many terms if we use long unsigned ints of 64 bits? |