Team submit link Submit your team's file with this link. Use the Lab 2 menu choice.
Educational goals of this lab - verify that every student can
Preparations:
INSTRUCTIONS:
Enter a number of bits: 256 There are 0 kilobytes and 32 bytes and 0 bits left over in 256 bits That is 0 * 1024 * 8 + 32 * 8 + 0 bits = 256 bits
Another run
Enter a number of bits: 50000 There are 6 kilobytes and 106 bytes and 0 bits left over in 50000 bits That is 6 * 1024 * 8 + 106 * 8 + 0 bits = 50000 bits
Another run
Enter a number of bits: 350 There are 0 kilobytes and 43 bytes and 6 bits left over in 350 bits That is 0 * 1024 * 8 + 43 * 8 + 6 bits = 350 bits
Description | Input (number of bits) | Expected Output |
---|---|---|
Input giving 0 kilobytes, non-zero bytes, 0 bits | 1000 | ___A.___ |
Input giving non-zero kilobytes, 0 bytes, non-zero bits | 16389 | ___B.___ |
Number of bits is zero | 0 | ___C.___ |
Only the number of bits left over is non-zero | 7 | ___D.___ |
All results are non-zero | 10753 | ___E.___ |
Goal: Calculate the number of kilobytes and bytes in a given number of bits. Also state the number of leftover bits. Also show the calculation done.