0% found this document useful (0 votes)
12 views15 pages

计算机最终考试主题

The document covers foundational concepts in computer science, including Turing machines, computer architecture, and data representation systems. It discusses various number systems, logical and arithmetic operations, and the main components of computers, including CPUs and memory types. Additionally, it explores programming languages, the Internet of Things, cloud computing, big data, and artificial intelligence, highlighting their significance and applications in modern technology.

Uploaded by

yj7njnjdpd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views15 pages

计算机最终考试主题

The document covers foundational concepts in computer science, including Turing machines, computer architecture, and data representation systems. It discusses various number systems, logical and arithmetic operations, and the main components of computers, including CPUs and memory types. Additionally, it explores programming languages, the Internet of Things, cloud computing, big data, and artificial intelligence, highlighting their significance and applications in modern technology.

Uploaded by

yj7njnjdpd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Chapter 1

Turing machine
abstract machine to stimulate math operations, foundation of modern computers
has tape, controller(acts like CPU; can move), and read/write head

Von Neumann model


computer architecture based on the Turing machine. Contains:
★ ALU
★ control unit
★ memory
★ external storage
★ input and output

Computer components
hardware> physical parts of computer such as

● internal hardware: CPU, motherboard, network card, video card, HDD, SSD
● external hardware: flat-panel, printer, speaker, keyboard, mouse, flash memory

software> consists of sequence of instructions, operating on one or more data items, tells hardware
components what to do

● system software: run hardware, operating systems and drivers


● application software: carry other tasks, written in high level programming languages, translated to
machine language by compiler/interpreter

data> distinct information which computer system deals with, stored in binary. can be organized in many
data structures:

● arrays, lists, graphs, objects

Chapter 2
Positional Number System

each position is a unique symbol


r is base or radix. 𝜶 set of symbols
maximum value for base
𝑘
R=𝑟 − 1
binary system

base = 2, symbols 0 and 1

hexadecimal system
base r=16, representing four bits
10 base digits 0-9, letters A-F for numbers 10-15

octal system
base r=8
Conversion between Decimal, Binary, Hexadecimal, Octal (include the real number)

1. bases to decimal> determine place value, multiply each digit with place value, ass products

2. decimal to bases> repetitive division to convert integral part, repetitive multiplication for fractional part

● repetitive division> divide by base with R 1 removed, 0 if perfect division

● repetitive multiplication> multiply decimal with base, if 1 appears output 1, repeat until output 0.00
or infinite

3. binary-hexadecimal
four bits> one hexadecimal
divide binary numbers to four bit patterns, convert each 4-bit to one hexadecimal

4. binary-octal
three bits per one octal digit, divide per three bit groups and convert

5. octal-hexadecimal
translate to binary first then hexadecimal/octal

Chapter 3
unsigned/signed representation of integers
unsigned
an n-bit unsigned int can represent 2^n distinct int

signed

1. 2’

most common, only one value of zero


range is
𝑚−1 𝑚−1
−2 𝑡𝑜 2 −1
leave rightmost 0s up to the first 1 unchanged, complement rest
can be done by adding 1 to result after taking complement

2. 1’

switching all bits from 0-1 1-0

m-bit location can represent numbers from -(2^m-1 -1) to +(2^m-1 -1)
𝑚−1 𝑚−1
−2 − 1 𝑡𝑜 2 −1

3. sign and magnitude

m-bit location can represent numbers from -(2^m-1 -1) to +(2^m-1 -1)
there are two zeros -0 and +0
𝑚−1 𝑚−1
−2 − 1 𝑡𝑜 2 −1

Floating point representation using IEEE 754

Radix point moved to before the number

Normalization
Normalization is needed to set same standard for all mantissa, because exponents can be done in
different ways

- Implicit normalization : move radix to RHS of most significant 1 in bit sequence


(101.101)2
Moved to 1.01101
2 exponent > 2^2
Implicit is better with respect to precision

Biasing technique
Storing value in fixed space
Using IEEE 754 precision format, so add 127 to all exponents
Sign Exponent 8 bits Mantissa 23 bits
1 bit
Exponent explained using unsigned value

implicit
(101.101)2 > 1.01101 x 2^2
Convert back to number
𝑠 𝐸−𝑏𝑖𝑎𝑠
− 1 𝑥1. 𝑀 𝑥2
Sign Exponent 2 is 2+127 = 129 Mantissa

0 1 0 0 0 0 0 0 1 0 1 1 0 1
UTF-8
To represent every character in the world for international use, the Unicode character set was
developed. Unicode uses 16-bit (to represent over 65 thousand characters (65,536)) and
includes all the characters of the extended ASCII as its first 256 characters.Today, Unicode is
widely used by many computer systems and programming languages.
UTF-8 is the encoding system used by unicode

Run length encoding


GGGGAAAEEENNN > #G4#A3#E3#N3

Huffman encoding
AABBCCCCEEEEEDDAEE
A:3
B:2
C:4
D:2
E:7
Make tree

To find number of bits, multiply bit route from bottom to


topmost with number of letters

Ex: A = 1 1
There are 3 A’s so 2x3 = 6
Then add with different letters

Compress ration
𝑜𝑔 − 𝑐𝑜𝑚𝑝
𝑜𝑔
Original = bits*characters for huffman
Chapter 4
Logical operations at pattern level
Unary operator:
NOT 0>1

Binary operator:
AND 1 1>1 can unset bits
OR 1 0>1 setting bits to 1
NAND 1 1>0
NOR 0 0>1
XOR 0 1>1 flipping specific bits (add 1 to flip, 0 to leave unchanged)
XNOR if bits not equal = 0

Arithmetic operations on integers


Addition
Add in two’s complement, invert digits, add one to result
1+1=0, one carry, final carry in leftmost column discarded

Subtraction
(A)-(B) = A + (-B)
Negative of B taken with one complement aka flipping all, then add one or two complement
sekalian
00100010 = 11011101 = 11011110
Then add with A, result done two’s complement then add - sign to result

Overflow
When value is out of range of allocation, two kinds:
- Positive overflow
- Negative overflow

arithmetic operations on real numbers


check signs, if same do operation
if different, take absolute value larger-smaller use sign of larger
exponents are changed to have same decimal point place
add or subtract mantissas, normalize before storing, check for overflow
Addition
Convert to IEEE representation, make smaller exponent same with bigger by shifting mantissa,
then add. Result is … x 2^exp+127

Subtraction

underflow

any number in gap is set to 0> flush to zero underflow

Shift operations (logical shift and logical circular shift operations)


Logical shift
Usually applied to unsigned number
Right shift: Rightmost bit discarded, shift everything else to right, insert 0 to leftmost
Left shift: Leftmost discarded, shift all to left, insert 0 to rightmost

Logical circular shift


Circular right: leftmost replaced with rightmost
Circular left: rightmost replaced with leftmost

Chapter 5
Main components of a computer
- Processing unit
● Uniprocessor (one processor per system)
● Multi-core processor (two or more independent cores to circuit)
- Main memory
- input/output subsystem

Main components of CPU


Arithmetic logic unit ALU

Control unit (instruction register IR) + program counter


(PC)

Set of registers

Arithmetic logic unit ALU


● Arithmetic operation
○ Simplest unary operations: increment
○ Simplest binary operations: add, subtract, multiply, divide
● Logical operation
○ Simplest unary operation: NOT
○ Simplest binary operation: AND OR XOR

Registers
Limited storage capacity, but high speed to read or write
Three most common include:
- Data register
- Instruction register IR
- Program counter register PC

Memory
Main memory consists of collection of cells, with unique physical address
Address space: memory size any computer entity occupies
Two types:
- RAM random access memory> volatile
- Divided into static RAM SRAM, and dynamic RAM, DRAM
- ROM read only memory> written by manufacturer, users can read not write
- 3 types: programmable read only memory PROM, erasable programmable read
only memory EPROM, electrically erasable programmable read only memory
EEPROM
Memory hierarchy:
Cache memory: speed faster than main memory but slower than registers, located between
CPU/GPU and main memory, bridge gap of high clock speed and low access time of memory

Computer architectures (CISC, RISC)

Complex instruction set Reduced instruction set


computer CISC computer RISC

Instruction system Specific instructions and Focus on frequently used


functions, higher efficiency for instructions, makes simple
specific tasks and efficient features

Memory operation Multiple memory Restrictions on memory


manipulation instruction operation; simple control
operations

program Assembly language relatively Assembly language program


simple, complex programs requires large memory space
are easier so more effective
Program is complex and time
consuming

interrupt Responds to interrupt after Can respond to interrupt in


instruction executed appropriate place where
instruction executed

Chapter 6
TCP/IP model OSI model

transfer data between application Human computer interaction


different applications in two layer, applications can access
computers application network services

presentation Ensures data is in usable


Has protocols such as FTP, format and is where data
SMTP, telnet, HTTP encryption occurs

session Maintains connection,


controls ports and sessions

Segments and reassembles transport transport Transmits data using


packets, addresses according transmission protocols
to port number, connection including TCP and UDP
management, and flow control

Transmission control protocol,


user datagram protocol

Route selection, congestion network network Decides which physical path


control, error detection data will take

Several protocols such as IP,


ARP, RARP, ICMP

Specifies physical medium, Network Data link Decides format of data on


signal, bits interface network

physical Transmits raw bit streams


over physical medium

IP address (IPv4)
Internet protocol or IP address is a numerical label assigned to each device connected to a
computer network that communicates through use of internet protocol
Each device owns one IP address
IPv4 Consists of 4 bytes(32 bits), maximum number of internet addresses is 2^32
Notation used is dotted decimal notation

Devices in networks
Connecting devices can be divided into four types based on functionality
Repeaters and bridges are devices connect diff LANs
Router and gateways devices different WAN and MAN
1. Repeaters
Forward physical signals between two different network nodes, works at physical layer to make
a strong clean copy of signal as original signal is regenerated
Expands connecting distance, increase max number of network nodes, using diff transmission
rates between diff network segments, improves reliability and performance of LAN

2. Bridges
Works at data link layer to achieve LAN interconnection
Divide LAN into network segments, after receiving MAC data frame from LAN, opening and
validating frame, sends it to physical layer according to another LAN reassembling data frame

May not deal with data header that upper layer protocols put in
- Bridge can connect diff LANs at data link layer, even with LANs of diff data link layer
protocol, diff transmission medium and diff transmission speed
- Bridge connects the internet and transmit/receive data, gives info about storage, filter
MAC addresses, and retransmits data packets.

3. Switches
Device which amplifies internet through providing more connecting port for subject
High flexibility, performance-to-price rate, simple and easy implementation
Consists of WAN switch and LAN switch

4. Routers
Connects bigger internet like MAN or WAN
Two types of routing protocols:
- Static routing protocols
- Dynamic routing protocols
Path selection according to routing protocol, packet switching, building map of network in form
of routing table, routing data between networks, accessing control list, restrict broadcast to LAN,
etc
Works at network layer (OSI’s third layer)
5 types of router: access router, enterprise router, backbone router, terabit router, multi-homing
router

5. Gateways> protocol converters, connect network above network layer


Most complex of all internet connecting device
Firewall and proxy server acts as a gateway
Regarded by some as router w/ protocol translators, regarded by others as gateway because
controls path through which packets of data are sent in and out

Chapter 7
Concepts of programming languages
Language designed to transmit instructions to a machine, or a computer

Evolution of programming languages


Machine > assembly > high-level > natural languages
Machine languages
Executed directly by computer’s CPU, bit patterns in octal/hexadecimal
Flexible, direct execution, and high-speed
The only language that computers are able to understand

Assembly languages
Using mnemonic letter codes to represent each machine language instruction
Allows programmers to write in easier ways, then assembled to machine language before
execution
Processor oriented programming language

High-level languages
Improved the efficiency of programming, ex: BASIC, python, PHP, HTML, C++, Java, etc

Natural languages
Language used in everyday life
In compsci fields such as : Natural language processing, AI.

In order to translate programs, there are two different methods:

Compilation
Program that translates whole source program into machine language program
called object program, object program then linked with supporting libraries using
linker to create executable files run directly to CPU
Compile languages: C, C++, go, rust

Interpretation
Program that reads each statement of source program in sequence, analyzes it,
translates to machine code then executes it, continuing to the next line.
Script languages: Javascript, python, PHP, ruby

7.1 comp
Chapter 8
IOT, big data, and cloud computing are conjoined in the emerging infrastructure of a smart
ecosystem

Internet of things IOT


IOT is the collective network of connected devices and technology facilitating communication
between devices and the cloud, as well as devices themselves
opportunity:
- Use of sensors to track RFID tags placed on products
- Video surveillance service for water level in reservoirs
- Medical body area network monitor heartbeat, blood pressure, temp, etc
- Cctv and fibre optic cables to monitor real time traffic condition
- Smart transportation systems

Cloud computing
Cloud computing is the delivery of computing services including servers, storage, databases,
networks, softwares, analytics, and intelligence over the internet.
- Resources and services are abstracted from underlying infrastructure
- Based on service level agreements and consumers, as they pay for what they consume
- Offers visualized network resources, reliable, efficient, security, optimal resource
utilization, scalability, compatibility, elasticity, low costs, easy to use, environmental
stability
opportunity:
- Security
- Energy efficiency
- Increased storage
- Cost savings
- Remote access
- Automatic updates
- Reliability
Big data
Large and diverse datasets that are huge in volume and rapidly growing in size over time. Used
in machine learning, predictive modeling, and other advanced analytics to solve business
problems and make informed decisions.
opportunity:
- Data science explores insights from big data, allowing principles and deep correlations to
be found
- Global transformation towards better living standards
- Ex: alibaba group, alipay, taobao, wechat pay, etc

Artificial intelligence AI
Simulation of human intelligence within machines or computer systems. Including expert
systems, natural language processing, speech recognition, and machine vision
Potentials:
- Advances in medical products and food
- Automation
- Improved efficiency
- Identification of malware
- Network traffic detection

You might also like