unit 2 Flashcards

1
Q

coding or programming

A

This is how we tell computers what we want them to do

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

Bright Idea #1

A

In 1679, Gottfried Leibniz invented the binary number system that uses only two characters—0 and 1—instead of the decimal system that uses numbers 0 through 9.

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

Bright Idea #2

A

In 1605, Francis Bacon worked out that letters of the alphabet could be reduced to sequences of binary digits. This is how ‘hello’ is written using the binary number system: 01101000 01100101 01101100 01101100 01101111.

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

Bright Idea #3

A

George Boole devised a form of algebra that encoded logic in terms of two states—true or false, yes or no, one or zero. If expressed that way, practically any mathematical or logical problem could be solved by just three basic operations, dubbed ‘and,’ ‘or,’ and ‘not.’

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

Bright Idea #4

A

During the late 1930s, several researchers realized that Boole’s operations could be given physical form as arrangements of switches—a switch being a two-state device, on or off. George Stibitz of AT&T’s Bell Laboratories built such a device using strips of tin can, flashlight bulbs, and surplus relays. The ‘K-Model,’ as Stibitz called it (for kitchen table), could add two bits and display the result.

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

Bright Idea #5

A

In 1939, John Atanasoff, a physicist at Iowa State College, constructed a rudimentary binary machine, and around the same time Konrad Zuse built a programmable calculator in Germany. It used Boole’s Boolean logic together with Leibniz’s binary numbers to store numbers representing information, or data and performed very simple mathematical operations. Thus, the first computer was born.

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

data

A

Inside your computer, there are a couple of core components that store and process data. These components include a main memory to store program instruction and data that is currently being used so that it is quickly accessible. If the computer was a brain, the main memory would be the short-term memory. There is also the secondary memory, that stores information for the long run.

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

programming languages

A

programming languages create codes that represent binary numbers, so that programmers can write computer programs in a language closer to their natural speech. Another program can also easily translate their code into binary instructions that the computer can understand.

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

machine code

A

Machine code uses numbers to represent binary strings, making instructions much shorter and giving the programmer the ability to reference specific locations in the computer’s memory. And is a second generation language

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

Assembly language

A

Assembly language goes one step further and uses short letters or words to represent machine code instructions, and in turn binary code.

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

MOV AL, 61h

A

MOV AL, 61h represents the binary value 10110000 01100001. In simple English, it is telling the computer to “move a copy of the following value into position AL in the computer’s memory: 97.”, MOV AL is the instruction, and 61h is the number 97.

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

Translators

A

Special programs that translate computer programs into machine code are called translators. There are two main types of translator programs, compilers and interpreters.

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

Compilers

A

Compilers produce a fully translated program that can be saved in a file and executed whenever it is needed. Often these programs are compact and can run very quickly.

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

executable program

A

Compilers read an entire program in a programming language and produce the complete set of machine instructions for that program, known as the executable program, to be saved and run later.

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

Interpreters

A

Interpreters read small portions of a program at a time, translate them to machine instructions, and execute these instructions immediately.

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

operating system

A

There are many important system programs. One that is extremely important in most computers is the operating system, as it makes all the other software and hardware work well together.

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

3GL

A

3GLs allow us to write computer instructions with greater ease and simplicity.

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

low-level languages

A

Today, there are five generations of computer programming languages. First- and second-generation languages are called low-level languages

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

high-level languages

A

Third-, fourth-, and fifth-generation languages are called high-level languages as they let you write computer code using more natural speech.

20
Q

programming paradigms

A

There are different ways to structure your instructions, and the instructions are suited to different purposes.

21
Q

procedural programming

A

In other words, the computer program tells the machine what to do in order, step by step. This became the natural paradigm for early programming languages, and it is still a natural place for the beginner programmer to start.

22
Q

object-oriented programming (OOP)

A

Giving a computer a description of what you want.

23
Q

Principle 1: Objects & Methods

A

An object is a collection of data about an item, such as a ball, or the beach, or the ocean that we spoke about earlier. The data about an object is called its properties.

24
Q

functions

A

In OOP, the sequence of statements, or the functions, “belong” to the object.

25
Q

Principle 2: Classes & Instances

A

Just like in real life, in OOP an object is a specific thing. A class is a template that we can use for creating objects. In technical language, we say an object is an instance of the class; it has been “instantiated.” In other words, a unique and independent object was created from the class template at a specific instant in time.

26
Q

Principle 3: Inheritance

A

Inheritance means a programmer can purposefully make a class or object inherit all the properties and behaviors of another class or object.

27
Q

Principle 4: Overriding

A

In your object or method, you can replace a specific method of a class with your object’s own unique version.

28
Q

Principle 5: Encapsulation

A

In other words, encapsulation is the ability to hide information within a class and only make certain information accessible to the outside world. You control how much access other classes have to your class.

29
Q

Principle 6: Polymorphism

A

The draw method is polymorphic, it can take many different forms. Polymorphism allows you to write simpler programs and it’s a major strength of OOP.

30
Q

Did you know

A

Did you know that some programming languages have the ability to be both procedural and object-oriented? Python, Java, and C++ are all called hybrid languages because they can be used to write procedural programs or object-oriented programs. Talk about versatile!

31
Q

Assembly Language

A

The lowest level programming language—and one that may be considered a notation rather than a language—is assembly language.

32
Q

Adding two numbers

A

Consider a machine instruction sequence to add the two numbers 7 and 5.

33
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.

34
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.

35
Q

FORTRAN

A

In the 1940s and early 50s computers had one main purpose, which was to do calculations. 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.

36
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.

37
Q

C

A

C is a relatively low-level language designed specifically as a companion to the Unix operating system. C was extremely popular in the 1980s and 90s, and it is still used a lot today for applications such as direct programming of physical devices.

38
Q

LISP

A

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.

39
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.

40
Q

Javascript

A

JavaScript is based on C, but it trades performance for power and dynamism. It carries the -Script suffix as it’s a scripting language.

41
Q

integrated development environment

A

An IDE gives a programmer access to all the tools that they will need in one place, through a single graphical user interface (GUI).

42
Q

Source Editor

A

This is basically an enhanced text editor, that is tailored towards writing computer code.

43
Q

Debugger

A

IDEs have built-in debugging tools. These include detecting and underlining problematic lines of code and printing error messages when you run the program.

44
Q

Test Generator

A

tests measure how secure and impenetrable your software is, as hackers try and break in to take advantage of your software for their own nefarious means.

45
Q

Analyzer

A

Analyzers measure the speed and efficiency of your software.

46
Q

Compiler

A

A software developer needs to choose a compiler to translate the code into machine language or binary code for the computer. Most IDEs will have a compiler packaged in with them.