Armstrong or Not

 

Aim:

To implement a program that checks whether the given number is a Armstrong or not. 

 

Instructions:

The program to checks whether the given number is Armstrong and its equivalent low-level instructions executed by the hardware. The low-level instructions used are: 

add It adds the values contained in the register and store the result in first register.  
assign It assigns a value to a variable.
div It divides the values contained in two registers and puts the result in the first register. 
eq It is the equal to operator,  check if the values in two registers are same. 
gt Greater than operator, checks whether the first operand is greater than second operand and return a boolean value based on the condition. 
if _false  Checks if the condition evaluated to be false. 
if_true Checks if the condition evaluated to true 
in It reads the input from the user and stores it in a variable. 
label Is used to mark the position in the low-level instructions to enable jumping to the marked position. 
load It loads a value of a global or local variable to the given register. 
mul It multiplies the values contained in two registers and puts the result in the first register. 
out It prints the output value to the screen. 
rem It performs division operation of the values contained in two registers and puts the remainder in the first register. 
store It stores the value from the given register to the global or local variable. 
sub It subtracts the value contained in the second register from the first register.