一道计算机的题目An imaginary computer has eight data registers Rx(R0 to R7),16M words in memory,the address can address words in the 16M memory,and have 32 different instructions (ADD,SUB,etc.).A typical instruction of the computer uses follo
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/08 12:07:16
一道计算机的题目An imaginary computer has eight data registers Rx(R0 to R7),16M words in memory,the address can address words in the 16M memory,and have 32 different instructions (ADD,SUB,etc.).A typical instruction of the computer uses follo
一道计算机的题目
An imaginary computer has eight data registers Rx(R0 to R7),16M words in memory,the address can address words in the 16M memory,and have 32 different instructions (ADD,SUB,etc.).A typical instruction of the computer uses following format: SUB address,Rx
1,What is the minimum size of an instruction in bits?
2,If the instruction is in the minimum size and the computer uses the same size of word for data and instructions,What is the size of the data bus?
3,What is the size of the program counter?
4,What is the size of the address bus?
5,What is the minimum size of the control bus?
一台假想的计算机有八个数据寄存器,标号是Rx(即R0~R7),16M字节的内存,并能按字节寻址,有32条指令(加,减等).这台计算机中典型的指令格式如下:
SUB address,Rx
即 指令名 地址,数据寄存器号
1.一条指令最少要多少位?
指令占5位:2^5=32;
地址占24位:2^4=16,计算机中2^10=1K,2^20=1M,所以16M=2^(20+4);
寄存器占3位:2^3=8,也就是3位二进制数可以表示八个不同的寄存器.
因此一条指令所占用的最少位数=24+3+5=32
2.如果指令占用最小的位数(即32位)并且这台计算机用相同的字长来传输数据和指令(字长32位),那么它的数据总线的宽度(32位,因为计算机一次处理一个字)
3.程序计数器(PC)的宽度
因为内存中有16M的地址单元,因此需要24位的程序计数器来表示.
4.地址总线的位数
24位,原因见上.
5.控制总线的最小宽度
1位(控制读或写操作)
--------------------------------------------------------------------------------------
就是 第一小题那个指令的位【为什么】是这样算的?
(表示各种概念有点混淆,最好详细点,有答案了加分,谢谢了)
一道计算机的题目An imaginary computer has eight data registers Rx(R0 to R7),16M words in memory,the address can address words in the 16M memory,and have 32 different instructions (ADD,SUB,etc.).A typical instruction of the computer uses follo
32种指令的话需要5位二进制的数才能表示完全:00000~11111(即十进制的0~31).所以指令位至少得占5位才行