Click on the picture below to check your knowledge of key Network Security concepts: Forms of attacks, threats and approaches to secure a network.
Network Security TerminologyOpen Domino Activity
Click on the picture below to check your knowledge of key Network Security concepts: Forms of attacks, threats and approaches to secure a network.
Network Security TerminologyOpen Domino Activity
In our previous blog post, “Binary Additions using Logic Gates”, we investigated how logic gates can be used together to create a circuit used in the ALU (Arithmetic & Logic Unit of the CPU) to add two binary numbers together.
In this blog post we will investigate how logic gates are used to create the RAM (primary memory), in other words how logic gates can be used to store volatile information.
RAM consists of billions of Data Cells, each data cell being able to store one bit of information. For instance a 2GB RAM can store 2,000,000,000 Bytes of information = 16,000,000,000 bits of information and hence consists of 16,000,000,000 data cells.

![]() |
Click on the above circuit to open in a new window.A D-Type Flip-Flop Circuit is used to store 1 bit of information. It has two input pins (Called D (Data) and E (Enabler) and two output pins (Q and Q = NOT Q).
The truth table of a D-Type Flip-Flop circuit is as follows:

When the enabler input E is set to 1, the output Q can be set to the Data input D.
When the enabler input E is set to 0, the output Q cannot be changed. It remains as its previous value. In other word it retains its value. This is why this circuit is used to create memory cells (e.g in the RAM).

Random Access Memory (RAM) consists of billions of data cells, each data-cell uses a D-Type flip-flop circuit.

The Clock Signal is similar to a heart beat.
When the clock signal is applied to the Enabler input (in this case also called the clock input), the flip-flop output Q can only change values when triggered by the clock signal. The value of the flip-flop is held or delayed until the next clock signal. This delaying effect is also called a latch. This is why we call this circuit a D-Type flip flop where D stands for Delay.
In other words, the change of input (D) is not applied immediately (to the output Q) but is applied at the next “tick of the clock”. There are many applications to this delay such as the ability to create a frequency divider. (divide the clock frequency by a multiple of 2).

Delaying effect when using a D-Type Flip-Flop circuit.
In our previous blog post “from transistors to processors” we found out that the CPU consists of logic gates, which are made using transistors.
In this blog post we are looking at how these logic gates can be combined to create an integrated circuit used by the ALU (Arithmetic and Logic Unit of the CPU) to add two 8-bits binary numbers together.
First let’s recap on how a binary addition works:
A half-adder circuit consists of two logic gates as follows:

You can test this circuit by clicking on the picture below:

A full-adder circuit consists of two half-adder circuits and an OR gate connected as follows:

You can test this circuit by clicking on the picture below:

Full circuit:


Vacuum Tubes are the precursors of transistors
Many consider the transistor to be one of the most important inventions of all time.
Though the precursors of the transistor were invented in 1907 (at the time they were not transistors yet, they were vacuum tubes called valves), these were soon replaced by smaller components called transistors. These are still the key components of modern computers nowadays.
So what is a transistor?
A transistor is an electronic component with three pins. Basically, a transistor is a switch (between two of the pins: the collector and the emitter) that is operated by having a small current in the third pin called the base.
Use the checkboxes below this transistor to understand how applying a voltage to the base of a transistor is equivalent to turning on a switch.


A transistor acts like a switch, operated by applying a small current to the base.

Transistors come in many shapes and sizes
Transistors are made by layering three types of materials: conductors, insulators and semiconductors.
Use the tabs below to see how some of the key logic gates are built using transistors:





Integrated Circuit 7408: Quad 2-input AND gate
More complex integrated circuits include binary adders (half-adder, full adder used to perform binary additions) and flip-flop circuits used to implement volatile memory.
List of 7400 series integrated circuits:
https://en.wikipedia.org/wiki/List_of_7400_series_integrated_circuits

A microprocessor is a computer processor which incorporates the functions of a computer’s central processing unit (CPU) on a single integrated circuit

1st Generation computers used Vacuum Tubes
Punch cards, paper tape, and magnetic tape were used as input and output devices. 1st Generation Computers were programmed using machine code.
1st Generation Computers were very expensive and only large organisations were able to afford them.

2nd Generation computers used Transistors
Magnetic tape and magnetic disks were used as secondary storage devices as well as punched tapes which were still used.
2nd Generation Computers were programmed using assembly language and high-level programming languages such as FORTRAN or COBOL.

3rd Generation computers used integrated circuits.
3rd Generation Computers were programmed using High-level languages (FORTRAN, COBOL, PASCAL, BASIC, ALGOL-68 etc.).

Atari 7800 – Motherboard

4th and 5th Generation computers use micro-processor chips.
Fourth generation computers became more powerful, compact, reliable, and affordable. They started the Personal Computer (PC) revolution.
For this challenge you will use a graph data structure to create an Air Fligh Route Planner for a fictitious airline company offering flights across Europe.
Here is a map showing all the direct flights offered by this airline company:

Your task consists of implementing a graph data structure to store all the airports and connections for the above map using Python.
You will then use a range of algorithms to let the user choose an origin and a destination (e.g. From Dublin to Athens) and your program will:
Tip: To complete this challenge, we recommend you to be familiar with graph data structures (and how to implement them in Python) and key algorithms used with graphs (including shortest path algorithm) by reading our blog post: London Underground Journey Planner.

One method to estimate the value of π (3.141592…) is by using a Monte Carlo method. This methods consists of drawing on a canvas a square with an inner circle. We then generate a large number of random points within the square and count how many fall in the enclosed circle.

The area of the circle is πr2,
The area of the square is width2 = (2r)2 = 4r2.
If we divide the area of the circle, by the area of the square we get π/4.
The same ratio can be used between the number of points within the square and the number of points within the circle.
Hence we can use the following formula to estimate Pi:
Note: You may reach a better estimate of Pi by:

The aim of this Python challenge is to investigate how graphs can be used in Computer Science and investigate the key algorithms used when manipulating graphs in Python such as an algorithm to find the shortest path between two nodes of a graph.
For this challenge we will focus on a graph used to represent the London Underground Map (Zone 1).

tubemap = {"Aldgate" : ["Liverpool Street","Tower Hill"],
"Aldgate East" : ["Tower Hill","Liverpool Street"],
"Angel" : ["King's Cross St. Pancras","Old Street"],
"Baker Street" : ["Marylebone","Regent's Park","Edgware Road (C)","Great Portland Street","Bond Street"],
"Bank" : ["Liverpool Street","St. Paul's","London Bridge","Moorgate","Waterloo"],
"Barbican" : ["Farringdon","Moorgate"]
#...
}
This graph is a dictionary where the keys are the nodes of the graph. For each key, the corresponding value is a list containing the nodes that are connected by a direct arc from this node.
The full dictionary with all the stations for London Underground can be found in the Python trinkets below.
This algorithm uses a backtracking approach to explore different paths. It does stop as soon as a path has been found. Note that the path that will be found first may not be the shortest path though.
def find_path(graph, start, end, path=[]):
path = path + [start]
if start == end:
return path
if not start in graph:
return None
for node in graph[start]:
if node not in path:
newpath = find_path(graph, node, end, path)
if newpath: return newpath
return None
def find_all_paths(graph, start, end, path=[]):
path = path + [start]
if start == end:
return [path]
if not start in graph:
return []
paths = []
for node in graph[start]:
if node not in path:
newpaths = find_all_paths(graph, node, end, path)
for newpath in newpaths:
paths.append(newpath)
return paths
To make this algorithm more effective we also have a stopping condition to stop exploring a path that would be longer than the shortest path found so far.
def find_shortest_path(graph, start, end, shortestLength=-1, path=[]):
path = path + [start]
if start == end:
return path
if not start in graph:
return None
shortest = None
for node in graph[start]:
if node not in path:
if shortestLength==-1 or len(path)<(shortestLength-1):
newpath = find_shortest_path(graph, node, end, shortestLength, path)
if newpath:
if not shortest or len(newpath) < len(shortest):
shortest = newpath
shortestLength = len(newpath)
return shortest
More advanced algorithms can be implemented to overcome this issue. You may want to explore the following algorithms:
The Insertion sort algorithm is one of the key sorting algorithms used in Computer Science.
To start with, the algorithm considers the first value of a list as a sorted sub-list (of one value to start with). This iterative algorithm then checks each value in the remaining list of values one by one. It inserts the value into the sorted sub-list of the data set in the correct position, moving higher ranked elements up as necessary.
This algorithm is an O(n2) algorithm which is relatively efficient for small lists and mostly sorted lists, and is often used as part of more sophisticated algorithms.