Chapter 1 Flashcards

1
Q

What is a program?

A

A set of instructions that a computer follows to perform a task

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

Programs are commonly referred to as _________

A

Software

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

What is a programmer/Software Developer?

A

A person with the training and skills necessary to design, create, and test computer programs

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

List some popular companies that use Python:

A

Google, NASA, YouTube, various game companies, the New York Stock Exchange, and many others

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

What is hardware?

A

Refers to all of the physical devices, or components, of which a computer is made

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

List the 5 main major components in a computer?

A
  1. The central processing unit (CPU)
  2. Main memory (RAM)
  3. Secondary storage devices
  4. Input devices
  5. Output devices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the CPU?

A
  • The part of a computer that actually runs programs
  • When a computer is performing the tasks that a program tells it to do, we say that the computer is running or executing the program.
  • Today, CPU’s are small chips called microprocessors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Main memory? (RAM)

A
  • The computer’s work area (where the computer stores a program while the program is running, as well as the data that the computer is working with )
  • Referred to as Random Access Memory
  • Because the CPU is able to quickly access data stored at any random location in RAM.
  • RAM is usually a volatile type of memory that is used only for temporary storage while a program is running.
  • RAM is stored in memory chips
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Secondary Storage Devices?

A
  • Type of memory that can hold data for long periods of time, even when there is no power to the computer.
  • Programs are normally stored in secondary memory and loaded into main memory (RAM) as needed
  • Ex: word processing documents, payroll data, and inventory records, is saved to secondary storage
  • Most common type of secondary storage: Disk Drive, although Solid state drives (SSD) are becoming more poular
  • External storage devices also available, usually for backing up computers
  • Flash memory (ex: USB)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are input devices?

A
  • Input is any data the computer collects from people and from other devices. The component that collects the data and sends it to the computer is called an input device.
  • Example: Mouse, keyboard, touchscreen, scanner, microphone, and digital camera, disk drives, and optical drives
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is an output device?

A
  • Output is any data the computer produces for people or for other devices.
  • Ex: Video displays, printers, disk drives (system sends data to it)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the two general categories of software?

A

System and Application Software

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

What is system software?

A
  • The programs that control and manage the basic operations of a computer
  • Typically includes programs such as: Operating Systems (Windows, Mac, Linux, IOS), Utility Programs (task that enhances computer operations or safeguards data, like virus scanners), and Software Development Tools (assemblers, compilers, interpreters)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is application software?

A
  • Programs that make a computer useful for everyday tasks

- Ex: Microsoft Word, Powerpoint, spreadsheets, emails, web browsers, and game programs

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

What is a byte?

A

-Tiny storage location that is part of computer’s memory
-One byte is only enough memory to store a letter of the alphabet or a small number
-Each byte is divided into 8 smaller storage locations called bits
-

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

What is a bit?

A
  • Bits are tiny electrical components that can hold either a positive or a negative charge. Computer scientists think of a positive charge as a switch in the on position, and a negative charge as a switch in the off position.
  • When a piece of data is stored in a byte, the computer sets the eight bits to an on/off pattern that represents the data
  • A bit that is turned off represents the number 0, and a bit that is turned on represents the number 1. This corresponds perfectly to the binary numbering system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the binary numbering system? (binary)

A

Sequences of 1’s and 0’s

  • The position of each digit in a binary # has a value assigned to it
  • Note: There are 8 bits in a byte, so the largest value that can be stored in a byte is 255 (more bytes can be used to store larger numbers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Historically, one of the most common coding schemes to represent characters in computer memory is _______

A

ASCII (American Standard Code for Information Interchange)

  • Set of 128 numeric codes that represent different characters
  • Nowadays, Unicode is becoming the standard coding schemes
19
Q

How are negative numbers and real numbers encoded? What coding schemes do they use?

A

Negative numbers: Two’s complement
Real Numbers: Floating-Notation Point
(both of these convert these numbers into binary format)

20
Q

What is digital? What is digital data? What is a digital device?

A
  • Digital: Anything that uses binary numbers
  • Digital Data: Data that is stored in Binary format
  • Digital device: Anything that works with binary data
21
Q

What is a pixel?

A

Tiny dots of color that make up a picture.

-Each pixel is converted into a numeric code, which is then stored as a binary number

22
Q

What is a sample?

A

Small pieces that a digital song is broken into

-Samples are converted into binary numbers which can be stored in memory

23
Q

List some basic tasks that a CPU does:

A
  • Reading a piece of data from main memory
  • Adding two numbers
  • Subtracting one number from another number
  • Multiplying two numbers
  • Dividing one number by another number
  • Moving a piece of data from one memory location to another
  • Determining whether one value is equal to another value
24
Q

Each instruction in a ________is a command that tells the _____ to perform a ____________.

A
  1. Program
  2. CPU
  3. Specific Operation
25
Q

CPUs only understand instructions that are written in _______________, and machine language instructions always have an underlying _______structure.

A
  1. Machine language

2. Binary

26
Q

What is an instruction set?

A

The entire set of instructions that a CPU can execut

27
Q

Explain the process of opening an application on a computer:

A

-To execute a program from your computer’s disk, first click on the program icon. This copies the program from the disk to the main memory.
-Computer CPU executes this copy of the program that is in the main memory
-When the CPU executes the instructions of that program, it is a process called the fetch-decode-execute cycle
-

28
Q

Describe the fetch-decode-execute cycle

A
  1. Fetch. A program is a long sequence of machine language instructions. The first step of the cycle is to fetch, or read, the next instruction from memory into the CPU.
  2. Decode. A machine language instruction is a binary number that represents a command that tells the CPU to perform an operation. In this step, the CPU decodes the instruction that was just fetched from memory, to determine which operation it should perform.
  3. Execute. The last step in the cycle is to execute, or perform, the operation.
29
Q

Instead of using binary numbers to program with _____________, ______________ uses short words known as mnemonics.

A
  1. Machine Language

2. Assembly language

30
Q

The CPU only understands _________________, so a special program known as a ___________is used to translate an assembly language program to a machine language program.

A
  1. Machine language

2. Assembler

31
Q

Why is assembly language referred to as low-level language?

A

Because it is so close in nature to machine language (binary)

32
Q

What is high-level languages? Provide some examples:

A
  • Allows you to create powerful and complex programs without knowing how the CPU works and without writing large numbers of low-level instructions.
  • Most high-level languages use words that are easy to understand.
  • Ex: Python, BASIC, FORTRAN, C, C++, C#, JAVA, Javascript, Ruby, Visual Basic
33
Q

Each high level programming language has its own set of ______, or _____________. They also have their own ________ that performs operations of data. Each language also has it’s own ______, which is a set of rules that must be strictly followed when writing a program.

A
  1. Keywords, or reserved words
  2. Operators
  3. Syntax
34
Q

What is a statement?

A
  • The individual instructions that you use to write a program in a high-level programming language
  • statement can consist of keywords, operators, punctuation, and other allowable programming elements
35
Q

What is a compiler?

A

a program that translates a high-level language program into a separate machine language program.

36
Q

What is an interpreter?

A

Similar to a compiler
-a program that both translates and executes the instructions in a high-level language program(combines translation and execution)

37
Q

What is source code, or just code?

A

The statements that a programmer writes in a high-level language

38
Q

What is the process that a computer programmer takes when writing code?

A
  1. Programmer types a program’s code into a text editor then saves the code in a file on the computer’s disk.
  2. Programmer uses a compiler to translate the code into a machine language program, or an interpreter to translate and execute the code.( If the code contains a syntax error, however, it cannot be translated. )
    (A syntax error is a mistake such as a misspelled keyword, a missing punctuation character, or the incorrect use of an operator)
39
Q

What is the Python interpreter?

A

a program that can read Python programming statements and execute them. (Sometimes, we will refer to the Python interpreter simply as the interpreter.)

40
Q

What is Interactive mode vs Script mode with the Python interpreter?

A
  • Interactive mode: The interpreter waits for you to type Python statements on the keyboard. Once you type a statement, the interpreter executes it and then waits for you to type another statement.
  • Script mode: The interpreter reads the contents of a file that contains Python statements. Such a file is known as a Python program or a Python script. The interpreter executes each statement in the Python program as it reads it.
41
Q

How do you print text in Python?

A

print(‘Python programming is fun!’) [Enter]

42
Q

Although ____________ is useful for testing code, the statements that you enter in interactive mode are not saved as a program. They are simply executed and their results displayed on the screen. If you want to save a set of Python statements as a program, you save those statements in a file. Then, to execute the program, you use the Python interpreter in __________.

A
  1. Interactive mode

2. Script mode

43
Q

What is IDLE (integrated development environment)?

A

-a single program that gives you all of the tools you need to write, execute, and test a program.