Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Part 1: The \"Little Man\" computer in the textbook uses decimal numbers for dat

ID: 3666406 • Letter: P

Question

Part 1: The "Little Man" computer in the textbook uses decimal numbers for data words and instructions. This makes it easier to explain to students who do not know about binary numbers. (Unlike yourselves!) A real computer would use binary numbers for reasons of reliability.

The Little Man computer can have ten operation codes (0-9), can address 10010 words of storage (0-99), and can hold in memory values up to 999. If binary numbers are to replace decimal numbers, what must the minimum number of bits in each word of the binary LMC be? (This isn't hard. How many bits for ten op codes? OK, how many bits for 100 addresses? How long must an instrution word be? That takes care of the instruction part. Now, can a word that is the sum of those operation code and address bit sizes hold the number 999? OK. You're done.)

Explanation / Answer

In order to distinguish 10 codes for operation, the minimum word size would have to be 4 bits. Using 4 bits, you can represent up to 2^4 = 16 possible codes since each bit can be either a 0 or 1. Anything less (2^3 = 8) will not allow a separate binary number for each code.

The number of bits for opcode will be 4 bits

the number of bits for addresses will be around 7 to 8 bits

The total number of bits for the instruction=opcode bits+address bits=>4+8=>12 bits