指令

2.1 Introduction (简介)

To command a computer's hardware, you must speak its Language.

去命令一台计算机的硬件,你必须说它们的语言。

The words of a computer's language are called instructions, and its vocabulary is called an instruction set.

计算机语言的词汇被称作指令,并且它们的字典被称作指令集。

In this chapter, you will see the instruction set of a real computer, both in the form written by people and in the form read by the computer.

在这一章,你将看见一台现实计算机的指令集,在格式上被人书写,在格式上被计算机读取。

We introduce instructions in a top-down fashion.

我们介绍指令,以从顶至底的方式进行。

Starting from a notation that looks like a restricted programming language, we refine it step-by-step until you see the real language of a real computer.

从一个符号开始,那看起来像是一个严格的程序语言,我们逐步加强,直到你看见真正的计算机语言。

Chapter 3 continues our downward descent, unveiling the hardware for arithmetic and the reprsesntation of the floating-point numbers.

第三章继续向下展开,拉开了硬件的算法和体现出浮点数。

downward// 1. adj. adj. n  A downward movement or look is directed towards a lower place or a lower level.

...a firm downward movement of the hands.

2. [adj] adj +n  If you refer to a downward trend, you mean that something is descreasing or that a situation is getting worse.

The downward trend in home ownership is likely to continue.

descent/dis'ent/ 1. [N-var]   A descent is a movement from a higher to a lower level or position.

...the crash of an Airbus A300 on its descent into Kathmandu airport.

2.[N-count] A descent is a surface that slopes downwards, for example the side of a steep hill.

On the descents, cyclists spin past cars, freewheeling downhill at a tremendous speed.

3. [N-sing] usu poss  N into/from to n

When you want to emphasize that a situation becomes very bad, you can talk about someone's or something's descent into that situation.

...his swift descent from respected academic to struggling small businessman.

4. [N-uncount] usu of adj. N

You use descent to talk about a person's family background, for example their nationality or social status(FORMAL)

All the contributors were of African descent.

unveil/ʌnv'eil/ (unveils, unveiling, unveiled)

1. [verb] v n

If someone formally unveils something such as a new statue or paintin, they  draw back the curtain which is covering it

... a ceremony to unveil a monument to the victims.

2. [verb] v n

If you unveil a plan, new product, or some other thing that has been kept secret, you introduce it the public.

Companies from across Europe area here to unveil their latest model.

unveiling [N-uncount] oft N of n

...the unveiling of a detailed peace plan.

 

You might think that the languages of computers would be as diverse as those of people, but in reality computer languages are very similar, more like regional dialects than like independent languages.

你也许会认为,计算机语言和人类语言一样,种类纷繁,但是,实际上,计算机语言是非常相似的,更像是地区性方言而不是独立体系语言。

diverse /daiv'æs/  1. adj. If a group or range of things is deverse, it is made up of a wide variety of thing.

... shops selling diverse rang of gifts...

2. [adj.] diverse people or things are very different from each other.

Jones has a much more diverse and perhaps younger audience.

Hence, once you learn one, it is easy to pick up others.

因此,一旦你学习了一种 ,很容易去学习其它的语言。

The chosen instruction set comes from MIPS Technologies, and an elegant example of the instruction sets designed since the 1980s.

被选择的指令集来自于MIPS技术,是一个简洁的指令集的例子,在20世纪80年代设计的。

elegant /eligənt/ 1. [adj.] If you describe a person or thing as  elegant, you mean that they are pleasing and graceful in appearance or style.

Patricia looked beautiful and elegant as always.

an elegant restaurant.  =stylish

elegance [N-uncount]

... princess Grace's understated elegance...

elegantly [adv]

... a tall, elegantly dressed man with a mustache.

2. [adj] If you describe a piece of writting, an idea, or a plan as elegant, you mean that it is simple, clear, and clever.

The document impressed me with its elegant simplicity.

elegantly [adv]

...an elegantly simple data.

To demonstrate how easy it is to pick up other instruction sets, we will take a quick look at three other popular instruction set:

为了展示,学习其它指令集是多么的容易,我们将先看一下其它三种流行的指令集。

1. ARMV7 is similar to MIPS. More than 9 billion chips with ARM processors were manufactured in 2011, making it the most popular instruction set in the world.

2. The second example is the Intel x86, which powers both the PC and the cloud of the PostPc Era.

3. The third example is ARMV8, which extends the address size of the ARMV7 from 32 bits to 64 bits. Ironically, as we shall see, this 2013 instruction set is closer to MIPS than it is to ARMV7.

The similarity of instruction sets occurs because all computers are constructed from hardware technologies based on similar underlying principlles and because there are a few basic operations that all computers must provide.

Moreover, computer designers have a common goal: to find a language that makes it easy to build the hardware and compiler while maximizing performance and minimizing cost and energy.

This goal is time honored; the following quote was written before you could buy a computer, and it is as true as it wasin 1947:

It is easy to see by formal-logical methods that exist certain [instruction sets] that are in abstract adequate to control and cause the execution of any sequence of operations...

The really decisive considerations from the present point of view, in selecting an [instruction set], are more of a practical natural:

simiplicity of view, in selecting an [instruction set], and the clarity of its application to the actually important problems together with the speed of its handling of those problem.

                Burks, Goldstine, and Von Neumann, 1947.

 This "simplicity of the equipment" is as valuable a consideration for today's computers as it was for chose of the 1950s.

The goal of this chapter is to teach an instruction set that follows this advice, showing both how it is represented in hardware and the relationship between high-level programming languages and this more primitive one.

Our examples are in the C programming language;

Section 2.13 shows how these would change for an object-oriented language like Java.

By learning how to represent instructions, you will also discover the secret of computing: the stored-program concept.

Moreover, you will exercise your "foreign language" skills by writing programs in the language of the computer and running them on the simulator with this book.

You will also see the impact of programming languages and compiler optimization on performance.

We conclude with a look at the historical evolution of instruction sets and an overview of other computer dialects.

We reveal our first instruction set a piece at a time, giving the rational along with the computer structures.

This top-down, step-by-step tutorial weaves the components with their explanations, making the computer's language more palatable.

Figure 2.1 gives a sneak preview of the instruction set covered in this chapter.

 

posted @ 2015-09-16 16:18  ZQXTXK  阅读(204)  评论(0编辑  收藏  举报