Sunday, 21 June 2015

Boolean

Boolean logic revolves around various gates, ones and zeros(true/false, yes/no). The gates take an input of one or more 1s & 0s and then outputs a one of zeros.
NOT GATE
It takes one input of 1/0 and outputs a 1 if the input was 0 and vice versa.
AND GATE
It takes two inputs and outputs a 1 if both inputs are 1 otherwise it outputs a 0.
OR GATE
It takes two inputs, if either of the inputs are 1 it outputs 1. 


Thursday, 11 June 2015

Secondary Storage

Drives

There are two main types of drives:
HardDrives:
Hard drives are cheaper that SSDs and that's about it. They contain moving parts so they are more unreliable and they are also slower than SSDS
Solid state drives:
SSDS are more expensive than hard drives, a 2TB hard drive would be £60 whereas a 2TB SSD would be £300. But SSDS are more reliable and quieter as they have no moving parts and they are a lot faster. They are also physically smaller.


SSDs are becoming more popular, a lot more computers are coming with SSDs. The biggest computer maker in the world, Apple uses SSDs in many of its products.
Though before the costs come down even further, which they have been doing, hybrid drives can be used. Hybrid drives have a large hard drive, typically 1tb and around 7gb of flash. The programs you use most often are put in the flash while the rest are put in the hard drive.



Memory

RAM

RAM, short for random access memory, is a small stick inside your computer where all the programs currently in use are held. They are held here because accessing RAM is a lot faster than accessing the hard drive. In most computers there are two sticks of RAM, this is because it is faster to draw data from two sticks of RAM (or even four+) than one.
It should be noted that RAM will always run at the same frequency, so a faster stick of RAM would run as fast as the slower stick of ram if placed together. Below is a typical stick of RAM:

The two things to look for when considering RAM is capacity and frequency. The capacity of RAM is what should be considered first as frequency does not have much of an effect on performance. A typical set of RAM would be two sticks of 4gb ram running at 1600mhz.
If you want to "splash out" you can get more performance RAM like the one below:
This may be running at speeds like 2400mhz. It can do this because it has heatsinks which keep it cool.

ROM

ROM, read only memory, is memory that can only be read. ROM, in a computer normally contains the BIOS, which contains the boot program. As soon as the computer turns on it will look in the ROM to load the boot program. This will then start up the computer. ROM is usually very small, only around 2mb in size. ROM can be changed via a process called flashing. Flashing is slightly dangerous because if something goes wrong the ROM will be corrupted and the computer may not be able to start.

Virtual Memory

Virtual memory is a portion of your hard drive that is used as RAM when your RAM has been filled up, this allows you to keep your programs running normally and it keeps your computer running normally.

Flash

Flash memory is memory is like a hard drive in the fact it does not need to be constantly refreshed, but it is like RAM in the fact that the operating system and files can be stored there while in use. But, like a hard drive they can be stored there when not in use.
Unfortunately flash corrupts easily. 







Monday, 1 June 2015

CPU




The CPU is a device inside your computer that processes all of the information going through your computer. It receives instructions, decodes them and then executes them. It does this really really fast. Lots of modern CPUS are "clocked" at 3GHZ+ which means that the CPU can do this cycle 3 billion times a second. This is per core. Most modern CPUS have 2 or more cores which means that each core can do 3 billion cycles a second. In a multicore processor cores can be allocated to different tasks unlike a single core processor where one core has to do everything.


The cycle of the CPU is simple and involves 3 devices: the ROM/RAM memory and the CPU its self. The CPU will fetch its instructions from the RAM and will then go to the ROM to work out what to do with the instruction. It will then process it and start the cycle again.

The CPU its self has two parts: the control unit, which uses electrical signals to direct the system and execute instructions. The other part, the ALU(arithmetic and logic unit)  carries out all arithmetic and logical operations including addition subtraction and comparisons.
Cache is a very small, but very fast amount of memory that is inside the CPU or just outside it. Instructions/data that is used often by the CPU is put here, this is so the CPU does not have to keep checking the main memory which is slower. There is several levels of cache, the higher the level the more cache but slower speed.
An average CPU, common place in most £500 PCs is an Intel I5. This has 4 cores, and each core runs at 3.4GHZ. A CPU like this would cost £140 on its own.
Source:





Bus

The bus is a circuit that connects key components together on a motherboard. Information travels along the buses between components, for example between a CPU and RAM.



CPU Conponents



Accumulator: the accumulator holds the instruction that is being processed by the CPU RIGHT NOW.

Memory Registers: the memory register holds memory addresses that are in use by the CPU, when the  CPU goes to fetch an instruction it looks here for the address of the instruction in the memory.

Arithmetic and Logic unit: This here is where the actual execution of an instruction takes place. The 
CPU uses the instruction (the operator) and the memory address it is pointed too (opperand) and uses this to execute the instruction.

Memory Address Register: this contains the register of the opperand in the systems memory, that is being operated on in the accumulator.

Current Instruction Register: this contains the register of the operator that is being executed on an opperand in the accumulator.

Control Unit: the control unit controls what goes where in the CPU for example when the CPU fetches an instruction it will decode it and put it in the accumulator and the registers in the current instruction register and memory address register.

Program counter: this keeps track of where the CPU is in a program 

Type of Software

Types of Software

There is many different types of software that are each useful in different situations.

Open source

Open Source software is avliable to the public and can be changed by the public. It is allways free to individuals.
Advantages - The public can be quicker to fix bugs and identify exploits in the code. They may also add desired features/additions to the code, for free.
Disadvantages - Due to everybpody being able to see the code hackers will be able to find exploits in the code and, exploit them.
Example - VLC media player and Linux are both examples of Open Source software.

Off the Shelf

Off the shelf software is software that is sold for a wide audience, it is usually made once and sold to the public.
Advantages - Its cheap as it caters to a wide audience, and it only needs to be made once.
Disadvantages - It may have features that you will not use and it will not be a perfect fit for your needs.
Example - An example of off the shelf software is Photoshop.

Custom/Bespoke

Bespoke software is made for an organization and is usually has very specific features.
Advantages - As you choose what is in it it is very flexible. It can be anything you want it to be.  
Disadvantages - It is usually very expensive as it is created just for you, it also take time to be made.
Example - An example of custom software is point of service software used in shops.

Proprietary

Proprietary software is software the is completely owned by the people who own it. You can not see the source code or edit it.
Advantages - No one apart from the creators can control it. This means any potential exploits can not be seen by hackers.
Disadvantages - Proprietary software looses all the benefits of open source software.
Example - An example of proprietary software is IOS.



Monday, 13 April 2015

Databases

Databases

A database is a collection of structured persistent data. An example of a database could be a database that stores your purchased Apple apps. 

There are 3 levels in a database:

Physical Data Level:

The physical data level is how the data is stored physically for example on a hard drive, and how the database files are stored and structured on the hard drive.

Conceptual view:

The conceptual view is how the database is internally managed. For example sql being used to access data on the database.

External view:

The external view is what the typical user will see, for example a search on google is an external view of Googles database, with data sorted and obtained from the physical data using the conceptual view.


  Example Table





Keyterms

Some example key terms are:

Column/Field - This is essentially an attribute of a record. For example an attribute of a "contact" database may be email or phone number.

Data Base Management System (DBMS) - Is the software used to create a database. An example of a GUI DBMS may be Microsoft Access whereas a non-GUI DBMS may be SQLite.

Data Type - Datatype is the type of data stored in a field, an example datatype may be integer or string, more "advanced" data types may be TIME/DATE.

Primary Key - The primary key is essentially the thing that identifys the record.     

SQL

Structured Query Language, is a language that is used, mostly when you are using code to access a database, to write database querys in. An example of an SQL query is: SELECT `email` FROM `contacts` WHERE `contact_name` = 'JohnJoe Stack'.
This would return "email" from a record that has a "contact_name" of "JohnJoe Stack", from a table that is called "contacts".

Sunday, 25 January 2015

Flowcharts

Flowcharts

Here is a selection of basic flowchart symbols:


Decision are used for when there is a choice, for example: is JohnJoe amazing y/n.
Process is for when something happens, for example: JohnJoe opened the door.
Input/Output is used for when something needs to be imputed. For example if you made toast the toaster would output a beeping noise when the toast is done.
Arrows are used to connect the various symbols in a flowchart.

Examples

Here is some pseudo-code for a program:
age = input;
if(age > 18)
print("Cool, you can buy a knife!");
else
print("Uh oh, no knife for you.");'
END
Now here is that represented with a flowchart

Here is that pseudo-code as a flowchart:


Great isn't it?

Problem 1


Problem 2


Problem 3

Monday, 5 January 2015

Software

Software


What is software?


Software is a collection of instructions that enable the user to interact with a computer or have it perform specific tasks for them.

Operating System

An operating system, sometimes called a platform is a collection of programs that control the hardware in a system or device.
Examples of operating systems:
  • Windows - a powerful multi-tasking operating system, created by Microsoft. It provides a graphical user interface(GUI).
  • UNIX - a robust and stable operating system used in servers and workstations. Traditionally a command line interface, but there are many user interfaces developed to run on top of UNIX such as:
  • MacOSX - Apples own proprietary OS, based on UNIX and IOS used on their MAC computers.
  • Linux - A fully open-source kernel, although often not supported by many programs, is very popular because it is free and is easier to use for certain tasks related to programming. Also, there is not one Linux OS, instead there is "distros" which are all based on Linuxs kernel but are different in some aspects. Most notability their UI.

Kernel

The kernel is a program that looks after the hardware operations. For example: checking if the mouse is moved, if a key is entered, or if any new hardware is connected to the PC etc. Essentially it manages communication between the hardware in a PC.

Multitasking



Multitasking allows the PC to manage multiple tasks. For example if the CPU is busy waiting for data to be loaded from the RAM it can work on other tasks.
Programs will have several states in a multi tasking operating system.

Running- The CPU is currently dealing with this process and others must wait.

Runnable- These processes are in the queue and ready to go, and just need the running process to finish or be interrupted to run.

Waiting- These processes are not even in the queue, and may not even be in the RAM. They are waiting for space to be available in the queue. 


   UI

Command-line:  The command line used to be the most popular for of UI, only because it was the only one available due to computers not having enough power to generate graphic images. You navigate the file structure and perform tasks with commands that you type in. Such as typing in run "file" would run the file.
Some die hard programmers still use the command line because the believe it is faster and easier to use (one thing to note is that for application developers it is a lot easier to create a program that only uses the command line than one that has a GUI). In some modern operating systems IE Linux you need to use the command line to perform many basic tasks. Such as installing software and unpacking files.

GUI: A graphical user interface is now the most popular form of UIs simply because it is easier and nicer to look at for most people. A GUI is (usually) navigated with a mouse, to click on icons and navigate etc, and a keyboard, to input data. 
A GUI is used by nearly every computer user.