unit 2 lesson 3 Flashcards

(9 cards)

1
Q

Adding two numbers

A
Consider a machine instruction sequence to add the two numbers 7 and 5. The steps in this sequence may be written as:
LOAD 7 into R1
LOAD 5 into R2
ADD R1 and R2, put sum in R3
STORE R3 in location Z
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Binary

A

The computer won’t understand anything other than 0s and 1s. Every command, number, and location in the set of instructions we just looked at will ultimately be translated into a sequence of instructions written in binary code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Machine Language

A
Our initial version is a little too wordy for assembly language— it’s closer to how a high-level language might look. In machine language, it may look something like this:
LD    R1,X
LD    R2,Y
ADD    R1,R2,R3
ST    R3,Z
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

FORTRAN

A

To meet this need, IBM developed a language called FORTRAN, which stands for FORmula TRANslator. As its name suggests, FORTRAN’s main purpose was to translate and work with mathematical formulas. FORTRAN became the first high-level language, and translator programs (or compilers) were developed so that FORTRAN could work on all major computers that were available at the time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Pascal

A

Pascal is a simple language designed in the late 1970s for teaching purposes. Pascal became very popular in the 1980s and 90s and was widely used for serious programming, especially on microcomputers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

C

A

C programs have quite a different style from others we have seen, and this style influenced many later languages, such as C++, Objective-C, and C#, developed over a span of 22 years.C++ is “one better than C,” meaning it is C with classes, making it an object-oriented programming language. Most of the Windows operating system is written in C++. Objective-C, as its name implies, added syntax to C to make it object-oriented and is the programming language behind the Apple operating system, OS X, and iOS apps, which are apps for iPhones and iPads.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

LISP

A

LISP (LISt Processing Language) is a very different type of language known as a functional language. LISP is not composed of statements but of nested sets of functions. It’s similar to a set of mathematical equations and is best suited to mathematical tasks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Java

A

Java is a compiled language in the style of C developed with the goal that programs should run on almost any computer, without having to make changes in the program. Java is designed primarily for object-oriented programming, but it can support procedural programming as well.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

JavaScript

A

The Java- prefix suggests that JavaScript is somehow related to Java, but it’s actually a totally separate language. Java was developed at Sun Microsystems, and JavaScript was developed at Netscape, an internet browser that was very popular back in the day. JavaScript is based on C, but it trades performance for power and dynamism.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly