文件名称:architecture-course-design
介绍说明--下载内容均来自于网络,请自行研究使用
组成原理课程设计
编写应用程序,实现以下功能:
通过机器指令集实现两个二进制数的四则运算。数据通过IN指令输入到A累加器中,输入菜单选项选取运算的方式(1:乘法,2:加法,3:减法,4:除法)。
输入形式:数据输入形式为二进制,第一个数据为第一个运算数,第二个数据为第二个运算数,第三个数据为菜单选项。
输出形式:通过实验箱上的out输出端口显示,显示形式为十六进制数。
实现说明:
乘法:通过循环使用加法实现乘法功能,第二个操作数作为被乘数,对其自身累加,当累加等于第一个操作数的时候,记录其累加次数,此累加次数便是out输出的结果。
加法:通过现有指令ADD实现两个操作数的加法运算
减法:通过现有指令SUB实现两个操作数的减法运算
除法:通过循环使用ADD,SUB指令和JC,JZ比较运算数的大小实现除法功能,将除数作为倍数累加,不断与被除数比较大小最后得出最终的累计次数,得出计算结果。-Architecture course design
Write applications to achieve the following functions:
Two binary number four machine instruction set computing. Data IN instruction input to the A accumulator input menu option selected operator (1: multiplication, 2: Addition 3: subtraction, 4: division).
Input forms: the form of input data to binary, the first data for the first operand, the second data for the second operand, the third data as a menu option.
Output in the form: out output port on the test box is displayed, showing the form of a hexadecimal number.
Implementation Notes:
Multiplication: cycle through the use of addition and multiplication function, the second operand as a multiplicand, accumulation of its own, when the accumulation is equal to the first operand, recording its accumulated number of times, the accumulated number of times is the result of the out output .
Addition: the addition of the two operands through existing instruction ADD
Subtraction: the su
编写应用程序,实现以下功能:
通过机器指令集实现两个二进制数的四则运算。数据通过IN指令输入到A累加器中,输入菜单选项选取运算的方式(1:乘法,2:加法,3:减法,4:除法)。
输入形式:数据输入形式为二进制,第一个数据为第一个运算数,第二个数据为第二个运算数,第三个数据为菜单选项。
输出形式:通过实验箱上的out输出端口显示,显示形式为十六进制数。
实现说明:
乘法:通过循环使用加法实现乘法功能,第二个操作数作为被乘数,对其自身累加,当累加等于第一个操作数的时候,记录其累加次数,此累加次数便是out输出的结果。
加法:通过现有指令ADD实现两个操作数的加法运算
减法:通过现有指令SUB实现两个操作数的减法运算
除法:通过循环使用ADD,SUB指令和JC,JZ比较运算数的大小实现除法功能,将除数作为倍数累加,不断与被除数比较大小最后得出最终的累计次数,得出计算结果。-Architecture course design
Write applications to achieve the following functions:
Two binary number four machine instruction set computing. Data IN instruction input to the A accumulator input menu option selected operator (1: multiplication, 2: Addition 3: subtraction, 4: division).
Input forms: the form of input data to binary, the first data for the first operand, the second data for the second operand, the third data as a menu option.
Output in the form: out output port on the test box is displayed, showing the form of a hexadecimal number.
Implementation Notes:
Multiplication: cycle through the use of addition and multiplication function, the second operand as a multiplicand, accumulation of its own, when the accumulation is equal to the first operand, recording its accumulated number of times, the accumulated number of times is the result of the out output .
Addition: the addition of the two operands through existing instruction ADD
Subtraction: the su
(系统自动生成,下载前可以参看下载内容)
下载文件列表
architecture course design.doc