Topics In Computer Science (CSCI 162) Midterm
Interrupts
A signal sent from a device or from software to the processor. This will cause the processor to temporarily stop what it is doing and service the interrupt. Interrupts can occur when:
Unicode
A standardized 16-bit character set that represents the character sets of most major languages in the world. See also the definition for "ASCII".
accumulator
A storage register in the ALU that holds data temporarily while the data is processed and before it is transferred to memory.
Interrupt
A suspension of a process, such as the execution of a computer program caused by an external event, performed in such a way that the process can be resumed.
single user system
A system that only allows one user at a time.
robustness
A term used to describe the ability of a program to resist crashing due to incorrect input or incorrect intermediate results.
secondary memory
A type of memory that allows a user to store data and programs for as long as desired, in, for example, a hard disk drive. The point at which the sector intersects with a track is used to reference the location.
De Morgans Law
A value can be converted from AND/OR to OR/AND. ex: (x+y)' = x'y' (xy)' = x' + y'
Benefits & Drawbacks Of A USB
Benefits
Internet Service Provider (ISP)
Companies that provide the user with access to the internet. A monthly fee is usually charged for this service. The ISP will set up a user account which will contain a username and a password, most ISP's also give the user an email address.
PROLOG What is a complex term?
Contains a functor and an argument(s). Ex: functor(argument) functor(argument1, argument2)
Synchronous Data Transmission
Continuous stream of data. The data is joined with timing signals generated by an internal clock, this makes sure the receiver is synchronised with each other.
11101110 ----> 238
Converting From Binary To Denary
2 1 F D
Converting From Binary To Hexadecimal
107 ----> 01101011
Converting From Denary To Binary
4 5 A ---> 0100 0101 1010 --> 010001011010
Converting From Hexadecimal To Binary
Asynchronous Data Transmission
Data being transmitted in a agreed bit pattern. Data bits (1s & 0s) are grouped together and sent with control bits:
Data Transmission
Data transmission can be either over long or short distances, three factors need to be considered when transmitting data.
encryption
In computer security, the process of transforming data into an unintelligible form in such a way that the original data cannot be easily obtained except by using a decryption process.
MARIE Define the command "Input" and "Output"
Input asks the user for input. And out put will print the value from the AC.
Universal Serial Bus (USB)
Is an asynchronous serial data transmission method, has quickly become the standard method for transferring data between a computer and a number of devices.
operating system (OS)
It is the core of computer system software. It manages computer resources, such as memory, and input/output devices, and provides an interface through which a human can interact with the computer. It allows an application program to interact with system resources.
MARIE Define the command "Jump X"
Jumps to address X.
1 Megabyte
Number Of Bits: 2²⁰
1 Gigabyte
Number Of Bits: 2³⁰
1 Kilobyte
Number Of Bits: 2¹⁰
1 Terabyte
Number Of Bits: 2⁴⁰
1 Petabyte
Number Of Bits: 2⁵⁰
Memory Dumps
Often used when developing new software or when trying to trace errors in programs. The contents of part of the computer memory can hold the key to help solve many problems.
MARIE Define the command "Store X"
Stores the contents of X into the AC
MARIE Define the command "StoreI"
Stores the value in AC at the indirect address.
MARIE Define the command "Subt x"
Subtracts value in AC at address X into AC AC <- AC - x
MARIE Define AC
The "Accumulator" intermediate data is stored within the AC. This is a temporary memory location.
MARIE Define IR
The "Instruction Register" holds the current instruction.
MARIE Define MAR
The "Memory Access Register" stores or fetches the data at the given address.
MARIE Define MBR
The "Memory Buffer Register" stores the data when being transferred to or from memory.
MARIE Define PC
The "Program Counter" as the suggests it stores the current position of the instruction, with each instruction having its own address.
MARIE Define the command "Clear"
The AC is cleared AC <- 0
Loop Body
The block of statements that are to be repetitively executed
von Neumann Architecture
The computer design built upon the principle that data and instructions to manipulate data were logically the same and could be stored in the same place. Another major characteristic is that the units that process information are separate from the units that store information.
PROLOG Can food(X) = food(bread)
Yes.
Distributive Law
You may expand, but AND distributes over OR x(y+z) = (xy)+(xz)
Absorption Law
You may factor out a similair term like in regular algebra, but the term factored on it's own remains (does not go to 1) ex: x+xy = x(x+y)
Variable
a named location for storing data values
Pseudocode
a notation for describing algorithms that lies between a formal program and plain natural language; typically, is highly structured and uses well-understood and computable statements
Buffers
Used in computers as a temporary memory area. Essential in modern day computers since hardware devices operate at much slower speeds than the processor. They are used when streaming videos from the internet, this ensures that the video playback doesn't keep on stopping.
HyperText Mark-up Language (HTML)
Used when writing and developing web pages. HTML isn't a program language but is simply a mark-up language. A mark-up language is used in the processing, definition and presentation of text.
Automatic Repeat Request (ARQ)
Uses an ACKNOWLEDGEMENT (message sent by receiver indicating the data has been sent correctly) and TIMEOUT (time elapse before an acknowledgement is received). If an acknowledgement isn't sent back to the sender before timeout occurs, the message is automatically resent.
Associative Law
Variables can be swapped if operators are kept the same. ex: x+(y+z)=(x+y)+z
Serial Data Transmission
When data is sent (One bit at a time, over a single wire or channel. (Bits are send one after another in a single stream)
Echo Check
When data is sent to another device, the data is sent back again to the sender. The sender compares the two sets of data to check if any errors occurred during the transmission, isn't very reliable if the two sets of data are different.
partition
When referring to a computer hard drive, it is a section of the hard drive that is separated from other segments, allowing e.g. multiple operating systems to run on the same device.
x•x'=?
0
Binary: 1+1=?
0, carry 1
Binary: 0+1=?
1
x+x'=?
1
Main Concept (Long) Explain the basic steps of the Fetch-Decode-Execute cycle:
1) Copy PC to MAR 2) Copy contents of memory to IR IR <- M[MAR]; PC++ 3) Decode Instruction: Place bits IR[11...0] into MAR 4) Ask if the instruct requires operand? If yes: MBR <— M[MBR], then execute instruction If no: execute instruction
Binary: 1+1+1=?
1, carry 1
Full Duplex Data Transmission
- Both directions simultaneously at the same time
Copy-over algorithm
- Create a second, initially empty, list - Look at each value in the original - If it is non-zero, copy it to the second list
Use Of Hexadecimal System
- Memory dumps
Simplex Data Transmission
- One direction only
PROLOG Can a variable = (be unified) with a complex term?
True
PROLOG True or False: can a variable = an atom?
True
Order of magnitude lg n Θ(lg n)
grows very slowly
control operations
operations that alter the normal sequential flow of control within an algorithm (Hint: remember the 's')
Intractable
problems with no polynomially-bounded solutions
Abstraction
the ability to separate the high-level view of an entity from the low-level details; a central intellectual tool in computer science
Iteration
the repetitive execution of a block of operations
Order of magnitude n, Θ(n)
the set of functions
Order n2, Θ(n2)
the set of functions whose growth is on the order of n2
Analysis of algorithms
the study of the efficiency of algorithms
Searching
the task of finding a specific value in a list of values, or deciding it is not there
Sorting
the task of putting a list of values into numeric or alphabetical order
Benchmarking
timing an algorithm on standard data sets
peripheral device
Any device that can communicate with a particular computer, for example: input/output units, auxiliary storage, printers. Used in dynamic data structures to move from item to item.
Symbol for NOT
'
Symbol for OR
+ "Where there's a 1, it equals one"
Half Duplex Data Transmission
- Both directions but not at the same time
Shuffle-left algorithm
- Search for zeros from left to right
Define "Mass Storage", give examples
-Also known as secondary storage -Physical, additional storage that the computer has Examples: Magnetic Disks, Cd's/Dvd's, Magnetic Tape (Floppy Disk), Flash Drives, Solid-state disks
Define "ASCII" (read as: Askee) and UniCode
-Seven bit patterns to represent upper lower case letters, punctuation, and digits (Also whitespace like tabs, spaces, and the enter key) -ASCII code begins with a 0 -unicode is what we use now, it accommodates for symbols in other languages while ASCII is embedded inside of it
Define "Main memory"
-a large collection of circuits, each capable of storing a single bit -also reffered to as RAM
Define "cell" and what it is equivalent to
-a managable unit to organize memory -equivalent to 8 bytes
Tautology
A boolean formula that's ALWAYS true
Contradiction
A boolean formula that's NEVER true
memory
A collection of cells, each with a unique physical address. Its addressability varies from one machine to another.
Library
A collection of useful prewritten algorithms that can be used during problem solving
database management system (DBMS)
A computer based system for defining, creating, manipulating, controlling, managing and using databases.
sensor
A device that detects measurable elements of a physical process for transfer to a computer.
input device
A device through which data and programs from the outside world are entered into the computer. Modern examples include: keyboards, mice, cameras (also known as, simply, webcams), and scanning devices.
output device
A device through which results stored in the computer memory are made available to the outside world. Examples include printers and screen monitors.
character set
A finite set of different characters that is complete for a given purpose, for example, the 128 ASCII characters.
verification (data input)
A method of ensuring that the data in the computer system is the same as the original source data. This may be done by double entry.
single-tasking
A mode of operation that allows only one program to be in use at any time.
Multitasking
A mode of operation that provides for concurrent performance, or interleaved execution, of two or more tasks.
register
A part of internal storage that has a specified storage capacity and is usually intended for a specific purpose.
arithmetic and logic unit (ALU)
A part of the computer that performs arithmetic operations, logic operations and related operations.
bar code
A pattern of vertical lines distinguished from each other by width. It can be read by a bar code reader to provide data to a computer.
Top-down design
A problem solving strategy in which you begin at the highest level view of the problem and, in steps, address the lower-level details of how to accomplish each operation
speech recognition (voice recognition)
A process of comparing spoken words with those stored in the system.
utility
A program designed to perform an everyday task such as copying data from one storage device to another.
memory manager
A program that is usually part of the operating system that controls the allocation of memory to various applications. It is particularly important in multi-tasking systems where applications might otherwise cause conflicts, and for implementing virtual machines and virtual memory.
search engine
A program that searches a large database to find matching items. The most common use of a search engine is to find Internet addresses based on given key words.
JPEG (joint photographic expert group)
A recognized standard of compression of graphics files that has some loss.
program counter
A register that holds the address of the next instruction to be fetched in the fetch execute cycle.
backup (file)
A second copy of a file, to be used in the event of the original file being corrupted. See also the definition for "unbalanced tree".
MARIE Define the command "Add I"
Add indirect. Use the value at X as the actual address of the data operand to add to AC
Half Adder Circuit
Adds 2 one-but numbers, (A,B) and outputs a sum and a carry
Full Adder Circuit
Adds 3 one-bit binary numbers (C,A,B) and outputs 2 one-bit binary numbers: a sum and a carry
MARIE Define the command "Add X"
Adds value in AC at the address X into the AC AC <- AC + X
Modem
An abbreviation for "modulator/demodulator": a piece of electronic equipment that converts digital signals from a computer into audio signals that are transmitted over telephone lines, and converts them back again.
Sequential algorithm
An algorithm that executes its operations in a straight line, from top to bottom, without any branching.
file manager
An application software that can access, create, modify, store and retrieve files. All such records in a file have the same length. See also the definition for "variable-length records".
defragmentation software
An application that reads file segments from non-contiguous sections of a storage device and then writes the files to the same device in such a way that each file segment is contiguous.
graphics tablet (graphics pad)
An input device on which the user writes or designs. The image is reproduced on the screen.
pointing device
An instrument, such as a mouse, trackball or joystick, used to move an icon (sometimes in the form of an arrow) on the screen.
Microprocessor
An integrated circuit incorporating the main components of a central processor. These circuits are used for microcomputers and small devices controlled by computer.
serial interface
An interface through which a computer transmits or receives data, one bit at a time. See also the definition for "parallel interface".
Primitive Operation
An operation that can be directly understood by the computing agent executing the algorithm and which does not have to be further clarified or explained.
bar code reader
An optical reader that can read bar codes. In a decimal system the base is 10, in a hexadecimal system the base is 16, and in a binary system the base is 2.
bit (b)
Binary digit. The smallest unit of information for data storage and transmission. Each bit is considered to be either a "0" or a "1".
B
Byte.
Address Bus
Carries signals relating to addresses between the processor and the memory
Control Bus
Carries signals relating to the control and coordination of all activities within the computer
Checksum
Check to see if data has been changed or corrupted. Data is send in blocks and additional value, also sent at the end of the block data.
digital data
Discrete data.
Web Addresses
Each character on a keyboard has what is know as a ASCII code (American Standard Code For Information Exchange)
Internet Protocol (IP) Address
Each device given a unique address know as the IP Address, this is a 32 bit number written in the form:
MARIE Define the command "Halt"
Ends the program. Equivalent to "return 0" in C++.
PROLOG True or False: can a complex term = an atom?
False
Sequential search algorithm
Given a target value and a random list of values, find the location of the target in the list, if it occurs, by
Binary Search Algorithm
Given a target value and an ordered list of values, find the location of the target in the list, if it occurs, by starting in the middle and splitting the range in two with each comparison
memory address register (MAR)
Holds the address in memory of the instruction at present being executed.
memory address register (MAR)
Holds the address in memory of the instruction at present being executed. It is particularly important in multitasking systems where applications might otherwise cause conflicts, and for implementing virtual machines and virtual memory.
MARIE Define the command "Load X"
Load contents of X into the AC
MARIE Define the command "LoadI"
Loads the value from indirect add into AC.
RAM
Memory in which each cell (usually a byte) can be directly accessed. Inherent in the idea of being able to access each location is the ability to change the contents of each location. That is, storing something else into that place can change the bit pattern in each cell
ROM
Memory which contents are permanent and cannot be altered by a second operation. Placing the bit pattern in it is called burning. The bit pattern is burnt either at the time the it is manufactured or at the time the computer parts are assembled.
Parity Checking
Method used to check whether data has been changed or corrupted following transmission from one device or medium to another device or medium.
Universally Administrated MAC Address (UAA)
Most common type of MAC address, set by the manufacturer at the factory. It is rare for a user to want to change this MAC address
Conditional statements
Operations that ask a question and select the next instruction to carry out based on the answer to that question (Hint: it's a statement)
Cache
Part of the main store that is between main memory and the processor. It holds a copy of data and instructions that are likely to be used next by the processor and is hence faster than main memory. See also the definition for "disk cache".
address bus
Pathway from memory to processing unit that carries the address in memory to and from which data is transferred. See the definitions for "bus" and "data bus".
disk cache
RAM set aside to speed up access to a hard drive. This may be part of the disk itself or may be incorporated in cache memory.
Media Access Control (MAC)
Refers to a number which uniquely identifies a device on the internet. The MAC address refers to the network interface card which is part of the device.
OCR Optical character recognition (reader)
Refers to the use of devices and software to "read" characters and translate them into ASCII characters for later processing. Applications of OCR include the scanning of printed documents to convert the text into digital ASCII text that can then be edited in word processors.
auxiliary storage devices
Secondary memory e.g. magnetic tape, magnetic disks,CDs and DVDs,flash drives, external hard drives
Data Bus
Sends data between the processor the memory unit and the input/output devices
Hypertext Transfer Protocol (HTTP)
Set of rules that must be obeyed when transferring files across the internet. When some form of security is used this is then changed to https.
Parallel Data Transmission
Several bits of data (Usually 1 byte) sent down several wires or channels at the same time, one wire or channel is used to transmit each bit
MARIE Define the command "Skipcond 000, Skipcond 400, and Skipcond 800"
Skipcond 000: Skip the next instruction if the AC < 0 Skipcond 400: Skip the next instruction if the AC = 0 Skipcond 800: Skip the next instruction if the AC > 0
Operating Systems
Software running in the background of a computer system functions include:
operating system (OS)
Software that controls the execution of programs and that may provide services such as resource allocation, scheduling, input/output control, and data management.
system software
Software that manages a computer system at a more fundamental level. It provides the tools and an environment in which application software can be created and run. System software often interacts directly with the hardware and provides more functionality than the hardware does itself.
Web Browsers
Software which allows a user to display a web page on their screen, browsers interpret or translate the HTML code from websites and show the result of the translation.
application software
Software written to address specific needs e.g. word processing programs, games, inventory control systems, automobile diagnostic programs, and missile guidance programs.
magnetic ink character recognition (MICR)
The identification of characters through the use of magnetic ink.
computer architecture
The logical structure and functional characteristics of a computer, including the interrelationships among its hardware and software components.
AND Gate
The output, X is 1 if: both inputs, A and B, are 1
NOT Gate
The output, X is 1 if: the input, A, is 0
XOR Gate
The output, X, is 1 if: (input A is 1 AND input B is 0) OR (input A is 0 AND input B is 1)
OR Gate
The output, X, is 1 if: either input, A or B, is 1
NAND Gate (NOT AND)
The output, X, is 1 if: input A AND input B are NOT both 1
NOR Gate (NOT OR)
The output, X, is 1 if: neither input A nor input B is 1
primary memory
The part of the memory where the data and programs that are in use at the time are stored.
data bus
The pathway between the memory or peripheral and processing unit that carries data for processing or data that has been processed. See also definitions for "bus" and "address bus".
data bus
The pathway between the memory or peripheral and processing unit that carries data for processing or data that has been processed. See also definitions for "bus" and "address bus". All redundancy in the data is removed to reduce the storage needed or to speed up transfer. The data can be uncompressed back to its original state.
Bus
The pathway used for sending signals between internal components of a computer. Components can share the same bus but cannot transmit simultaneously.
ASCII: American Standard Code for Information Interchange
The primary encoding character set used in computers for textual data transfer between applications. The set uses eight bits for each character code, one of these bits being a check bit to verify the seven bits needed to represent one character. ASCII supports most European alphabets. Unicode supports most known alphabets and is increasingly used in data transfer. See also the definition for "Unicode".
Fetch, Decode, Execute
The process includes four steps: fetch the next instruction, decode the instruction, execute the instruction.
Algorithm discovery
The process of finding an algorithmic solution to a given problem
multi-processing
The simultaneous execution of two or more computer programs or sequences of instructions by a computer (parallel processing).
sector
The smallest accessible storage unit on a disk. The point at which the sector intersects with a track is used to reference the location.
Continuation condition
The true/false condition that will determine when the iteration has been completed.
virtual memory
The use of secondary memory as if it were primary memory.
PROLOG What is an atom, and provide examples:
They can either: a) Start with a lower case letter b) Be in single quotes ex: atom, 'Atom'
PROLOG What is a variable, and provide examples:
They can either: a) Start with an upper case b) Start with an underscore ex: Variable, _variable
What do hexadecimals represent in binary, and what are there range?
They represent integers. There is 15 number places starting with the digits 0-9, and then A-F.
Approximation algorithms
algorithms that partially solve, or provide sub-optimal solutions to, intractable problems
Polynomially bounded
an algorithm that does work on the order of Θ(nk)
Exponential algorithm
an algorithm whose order of growth is Θ(2n)
Efficiency
an algorithm's use of time and space
Computation
an algorithmic operation that carries out a single numeric computation and stores the result
Output
an operation that causes computed values to be sent to the outside world for viewing or saving
Input
an operation that causes data values from the outside world to be brought into the algorithm
Worst case
when all but last symbol of pattern make up the text
Best case
when first symbol of pattern does not appear in text
(x')' = ?
x
x+x=?
x
x•x=?
x
Symbol for AND
• "Where there's a zero, it equals zero"