Question: For the MARIE program below, what is the decimal output if the decimal input is 6? Input Store Num While, Load Num Subt I Add
For the MARIE program below, what is the decimal output if the decimal input is 6? Input Store Num While, Load Num Subt I Add One Skipcond 800 Jump EndW Load A Add B Store Res Load B Store A Load Res Store B Load I Add One Store I Skip next instruction if Acc > 0 Jump While EndW, Load Res Output Halt Res, Dec 1 A, Dec B, Dec 1 One, Dec 1 I, Dec 2 Num, Dec 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
