Advanced LMC

There are three commands in LMC to branch a program which means to take the program away from its linear order:

BRA- Branch always. This will set the program counter to a given address where it will continue from there.

BRZ- Branch on zero. This will set the program counter to a given address if the value is zero where it will continue from there.

BRP- Branch on positive. This will set the program counter to a given address if the value is a positive where it will continue from there.

 

 

 

 

 

 

 

 

 

 

 

 

ERM and ERD

ERM stands for entity relationship modeller. It is a way of graphically showing the relationships between different entities within a relational database.

ERD stands for entity relationship diagram. It is used to show how the entities in a data model are related to eachother. For example,ERD

 

 

 

Networks

Advantages of networks:

They are important for communicating and sharing data which allows all users to access the right information. Networks allow data to be backed up. It allows different computers and hardware to connect to each other.

Disadvantages of Networks:

The user can become dependant on the network which means if it stops operating lots of resources may be inaccessible. It is hard to ensure security in a network which can be vulnerable to hackers. A network can degrade in performance as traffic increases.

Network protocols are rules that control the communication between devices.

The physical parts of a protocol are the physical connections such as wires or the frequencies used to send data.

The logical parts of a protocol are the things like the topologies like bus, star or ring for example, it can also include things like the file type used.

A network handshake is the exchange of signals to signify that the devices are ready to  communicate and to agree on protocols.

 

 

 

Database Keys

A primary key is a field that is used to uniquely identify a record in a table.

A secondary key is a field that can be used to access a table in a different way. It doesn’t have to uniquely identify a record but can be indexed for faster searching.

A foreign key is a field that links two tables together and has a many to one relationship. Foreign keys can be used to avoid data duplication.

This is an example of how Keys can be used:

db1

db2

db3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Databases

A database is a persistent store of organised data.

There are two types of database: A flat file and a relational database

A flat file database is held as a table and stored in a single file, the data is structured by records and fields. They are simple but less efficient and are prone to data redundancy which is where data is repeated or inconsistent.

A relational database uses multiple tables to increase efficiency and prevent data redundancy. It is easier to maintain as things only have to be changed in one place so is less time consuming and quicker instead of changing things individually.

Assemblers

An assembler is a program that translates a program written in assembly language in machine code. Assembly language is similar to machine code but uses mnemonics to represent opcode and denary to represent operand. Assembly language is useful in devices that have limited memory as it is a lightweight programming language.

This is done by replacing assembly language with machine code. An assembler can also offer diagnostics and check syntax.

Virtual Machines

A virtual machine is when software takes on the role of a machine, including executing intermediate code or running an OS within another. The machine being simulated doesn’t have to exist but may be a concept for the design of the software used.

The same virtual machine implemented of many hardware platforms can improve the portability of software, for example Java which executes intermediate code.

Intermediate code is a mix of both compilation and interpretation into intermediate code and executed by a virtual machine. This means that it can be ran on any machine with a virtual machine available.

CPU architecture and performance

CPU speeds are measured in hertz which means the number of clock ticks per second. Each operation takes a number of clock ticks to complete.

A multicore processor has more than one core so can do more than one instruction at a time so it is faster. But not as efficient as single core CPUs as some tasks cant be shared equally between two cores.

Parallel systems use several cpus to perform a single job where the job is split into a number of tasks which is processed by any available processor.

Cache memory is a part of the main store between the central processor and the rest of the memory. It has very fast access so sections of a program and its associated data are copied there to take advantage of its short fetch cycle.

Harvard architecture is when separate storage and single pathways are used to store data. It is efficient because while data is being read from memory, the next instruction can be read from  instruction memory.

A quad core processor has 4 individual cores. A cpu with 3.1ghz has a clock speed of 3.1 billion times a second. 6mb of l3 cache means level 3 cache which feeds l2 cache which feeds l1 cache which feeds the processor.