Machine Organization I
V22.0201 - Fall 2003

Assignment 1

Due: Dewar's Section 2: Monday, Sept. 29th
Hull's Section 3: Thursday, Sept. 25th

Create a program which inputs a number N and then computes the factorial of N. Note that since both input and output are BYTE quantities, there could be an error. Do NOT compute the largest factorial possible ahead of time. If a carry past 255 happens during your calculations, that is the time to signal that an error has occured.


Input (N)

Output (N!)

Error Code




The error code is = 1 if the factorial was calculated correctly, and is = 2 if an error occured.

You should submit your finished code to your E-Tutor. (E-Tutor email addresses will be posted shortly.)