问题 问答题 简答题

叙述堆栈型、累加器型和通用寄存器型指令集结构的特点,并比较它们的优缺点。

答案

参考答案:

堆栈型结构中,操作数被默认存放在栈顶,它的优点是其结构具有表达式求值的简单模型(符合逆波兰表示)以及指令字长较短因而能产生良好的代号码密度。它的主要缺点是不能随机访问,因此很难生成高效代码,此外堆栈口将成为瓶颈口,使性能受到影响。

累加器结构中,操作数之一总是被默认存放在累加器中,它具有可使机器内部状态减至最小并能形成短指令的特点,但由于累加器是唯一的操作数寄存器,将导致对存储器的频繁访问。

寄存器结构中,所有的操作数都必须加以显式说明,以指明其是存放在哪一个寄存器中或是存储器的哪一个单元,这种结构具有生在代码的最通用形式,但由于要对所有操作数所使用的寄存器加以命名,导致指令长度的增加。

阅读理解

阅读理解。

     DOYLESTOWN STATION, Pa. (CBS)-Marie Buonanno has boxes of holiday lights to decorate

her house. She already has one tree up in her living room and a nativity scene. But this holiday season,

she would not dare decorate outside.

     " It is very disappointing that we can' t celebrate the Christmas holiday the way that we religiously

choose to," says Buonanno.

     Her home only has a holiday wreath on the door, since the Doylestown Station Condominium

Association told her the bylaws do not allow colored Christmas lights. Last year, she was fined $400,

$ 10 for each day her lights were up. But she says she was the only one slapped with a fine.

     "One of my neighbors that I spoke to a few days ago, who decorates with multicolored lights, says

he never got a letter of warning or a fine. "

     Only white, non-blinking lights are allowed outside. And you can only put up a single white, blue, or

orange light in your windows. Neighbors collected 62 signatures to ask the Association board to allow

colored Christmas lights. In response, the Association sent out a survey.

     Out of 38 total responses, 19 voted for white lights, 14 voted for colored non-blinking lights, and 5

voted for colored blinking. The board said the vote was 19-14 against colored lights, interpreting the 5

votes as a separate category.

     "As long as it" s tasteful," says neighbor Marc Udell, "let the community do what the community is

going to do. "

     No one answered the door at the Association president* s house. Some neighbors say they like the

look of white lights.

    "Some colored lights are pretty and they have their place in neighborhoods, but you never really know

how far people are going to go with them," says Jeff Edwards.

     It will be a holiday of white lights for Buonanno and her neighborhood. She says for now she will

miss her colored lights and the holiday cheer they brought to her home.

1. This holiday season, Marie Buonanno has no choice but to _____.

A. keep the colored lights in

B. sell the colored lights out

C. leave the Christmas tree out

D. change all the attractive lights

2. The underlined part in the 3rd paragraph means _____.

A. she was the only rich woman in the neighborhood

B. she was the only resident punished with a fine

C. she was the only resident full of strange ideas

D. she was the only person fooled by neighbors

3. Which column does this passage belong to?

A. Science      

B. Environment    

C. Education    

D. News

4. According to this passage, colored lights are not allowed to decorate the outside of houses because _.

A. they are too pretty to be stolen

B. they waste a lot of energy

C. they can trick passers-by

D. they can make neighbors blind

单项选择题