View Single Post
Old 02-11-2004, 05:48 PM  
spamofon
Confirmed User
 
Join Date: Jun 2003
Location: Toronto
Posts: 2,999
LITLE MAN COMPUTER!!! Anyone rememmbers that??!?!

I had a question about Litlle man computer, and i was wondering if it can have a negative value...

this is the question and info for it (my answeres were -7 and 17)



Mailbox Code
Suppose that the following program is loaded in the LMC memory:


Memory address Instruction Address
00 Input 01
01 Store 20
02 Input 01
03 Store 21
04 Input 01
05 Store 22
06 Subtract 21
07 Branch Positive 10
08 Load 21
09 Branch 11
10 Load 22
11 Subtract 20
12 Output 02
13 Halt 00


5) [15] Suppose that the program is supplied with the following decimal numbers: 23 , 20 and 15 (in this order). What will be the output in decimal? And what will be the output if the numbers 15, 18 and 32 are supplied (in this order)?
spamofon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote