GEOG 264 Test #1

36 flashcardsby Alyssa
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
hardware
the physical components of a computer system
The functional organisation of a computer
2
CPU
The CPU interprets and carries out instructions
There are 1-8 processors
Is responsible for everything that goes on in the computer

2 part sto a processor
ALU (arithmetic logic unit)- does the actual computations or arithmetic
Control unit- the supervisor- controls the step-by-step operations on the entrie system

3
CPU register
Are a type of computer memory used to quickly accept, store, and transfer data and instructions that the CPU needs immediately The registers used by the CPU are called processor registers.
The function of a register is to store, accept, transfer, and manipulate the data.
4
How info is represented inside the computer
A computer is an electronic piece of equipment and consequently only understands 2 values: on and off

n a computer, on is represented by a 1, off is represented by a 0

0= 0000
1= 0001
2= 0010
3= 0011
4= 0100
5= 0101
5
expanding on bits
A basic unit of info is a byte- made up of 8 bits
“K”- 1024 bytes is a kilobyte ( around 1000) note
“Meg”- 1024 kilobyte= 1024 x 1024 = 1,048,576 ~ 1,000,000 is a megabyte
“Gig” – 1024 megabytes is a gigabyte
terabytes = 1024 gigabytes
6
megabits and megbytes
The thing to pay attention to is the letter case. There's a consensus that Mb are used for measuring download or upload speeds of the internet while MB refers to data sizes for files and hard drives.
A bit is a binary digit, which is a very small unit of digital data. 8 of these bits composes a byte
1MB= 8Mb
7
main memory
Bunch of cells or locations
Each cell can store one byte
Each cell has its own unique address or name
There are 2 kinds of memory; RAN and ROM
8
RAM vs ROM
RAM
Contents can be changed (volatile)
Lose contents when computer turned off
It is used to hold the programs and related data that are currently executed by the CPU
Random access= takes same time to access any cell
The term ‘main memory’ refers to the same thing as ‘random access memory’. It is a memory unit that communicates in a straightforward manner with the CPU

ROM
Contents cant be changed (non-volatile)
Contents retained even when computer is off
Used to contain essential instructions needed by the computer to get going, i.e., booting up
Also random access
9
CPU cache

Cache memory is used to store data that is used often so that it can be quickly accessed when needed

smaller size, not too expensive, faster than RAM
It is used to store the data which are frequently used by the CPU
10
CPU register
Registers are a small amount of fast storage element into the processor. It is faster than cache memory due to the smaller size and proximity with the CPU itself

It is used to store data temporarily for processing and transferIt holds operands or instruction that CPU is currently processing.
It costs more per byte than cache memory
11
RAM, ROM, Cache and registers
RAM is a volatile, temporary storage used for active data and program storage
ROM is a nonvolatile and contains essential firmware
Cache is a small but fast memory used to speed up data access
and registers are tiny, ultra-fast memory
Speed: ROM < RAM < Cache < Register
12
secondary storage
Cheaper and more permanent storage (turn off power don’t lose it)
Usually magnetic media
Data sticks or SSD – solid state drive
Internal disks or drives = 256 gig, 512 gig, 1 terabyte
External hard drive = 1, 2, 4 or 10 terabytes
CDs
The “Cloud”

Speed to access secondary storage depends on:
1. The time to find the data – access time
2. The time to transfer the data to main memory – data transfer rate
13
HDD vs SSD
SSDs (Solid State Drives) are faster, more durable, more compact, quieter, and consume less energy. HDDs (Hard Disk Drives) are more affordable and may offer easier data recovery if damaged.
14
IO devices
Input devices: keyboards, mice, joysticks, stylus, touch screens, touch pads, cameras, other sensors, audio mics
Outputs: printers, screens, speakers
15
programs
A sequence of instructions
Human author writes it
The CPU does it
Carrying out the instructions – executing or running a program
Software, programs and apps are all the same thing
16
Computers understand only very simple instructions
They understand only machine language. This language is too tedious to write programs in. Therefore, we write a program in a high-level language like R (or Python or Java or C++) and the computer takes our R program and turns it into machine language which it can understand by running a compiler or interpreter.
17
compiled bs interpreted language
A compiled language (e.g., C, C++) is converted into machine code so that the processor can execute it.

An interpreted language (e.g Python, R) is a language in which the implementations execute instructions directly without earlier compiling a program into machine language.
One less step than compiled languages but they run slower

The compiled programs run faster than interpreted programs.
18
system and application software
System software – that run the computer
a. Operating systems – Windows 11, macOS 14, Linux
b. Compiler/interpreter – R interpreter
c. User interface, maybe a GUI (graphical user interface) like on Mac or Windows, shell – older, uses command lines like in UNIX or plain R

Application software – things you use
a. General purpose – Word and other word processors; Text Wrangler, Notepad, VIM and other text editors, Excel and other spreadsheets; PowerPoint; browsers like Chrome, Safari, Firefox, search engines like DuckDuckGo; email like Thunderbird, Microsoft Outlook; ArcGIS; Google Maps; texting; R; Zoom
b. Specific purpose – payroll, MyConcordia, C-Space, games
19
operating system
The heart of all the computer’s software

A set of programs that manage the overall operations of the computer system

When you turn the computer on it must boot itself up. i.e., it must read the OS from the internal hard disk into main memory. The instructions for booting are stored in ROM. 4
20
Advanced OS operations
1. Multitasking – allows for the computer to be operating on 2 or more programs at the same time
2. Multiuser system – several terminals connected to a single computer.
3. Virtual memory – allows large-sized programs to run in small size PCs by dividing the program into pieces and transferring the sections into main memory at the correct time
4. Networking – gives one PC user remote access to hardware & software over a link like Wi-Fi, and Ethernet.
21
interacting with the OS
The user interacts via point and click with a mouse, a touch screen on a smartphone, typed commands on command line (old).

The user tells the computer to do things such as
Start up a new program
Send a file to a printer
22
vector
c( #, #, #, #)
23
creating a matrix
matrix(vector/data, nrow= n, ncol=n)

it is by default collum by column, but you can change it to row by row with, byrow=T
24
rbind() and cbind()
multiple vectors of the same length, you can put them together row by row or column by column

ex: rbind(1:3, 4:6), cbind(1:3, 4:6)

25
matrix dimensions and subsetting
dim(matrix)
ncol(matrix)
nrow(matrix)

subsetting:
matrix[row, column]
matrix[ ,3] --> all values in 3rd column
26
cat()
put each outcome on a new line
cat("text", variable, "\n")
27
sequence
seq(from= n, to=n, by= n)
28
OR
|
ex: if((temp < -100) | (temp > 100))
29
AND
&
ex: if((temp>= -100) & (precip >= 100))

this is incorrect in R: 2 < temp < 100
instead use this: ((2< temp) & (temp<100))
30
NOT
!
if (!(temp<0))
31
XOR
if (xor((2< temp), (temp < 100)))

* one or the other meet the criteria but not both
32
Cat vs paste vs print
cat: does not add separation or return a value
paste: allows for specifiying a separator (add sep= "+"), returns the conscentred string which can be assigned to a variable
print: displays value of an object
33
logical as numbers in R
T= 1
F= 0
34
convert data types in R
as.numeric
as.interger
as.character
as.logical
as.na
35
creating a new .csv file
write.csv(data, "name of new file.csv")
36
sample()
ex: sample(0:1000, 100)

will generate a vector of length 100 with random numbers between 0 and 1000
Study all 36 cards for free