Tuesday, 16 November 2010

Logic Gates

Logic gates are used within the digital circuits in computers, and conventional electrical circuits for many uses.  Millions of them will be in a processor, used to add binary digits (1s and 0s).  Their primary function involves one or two inputs and an output, and the output produced is dependent on the input and the nature of the gate.  The inputs and output will be either true or false (i.e. a 1 or 0), which may be transmitted through the wire as a high/low voltage or as ons and offs.  These combinations of different values of inputs and the corresponding outputs are represented in truth tables.  Each type of logic gate has its own truth table.
  What are known as Half-Adders and Full-Adders contain logic gates, and these are what are found in processors to add binary digits.  A Half-Adder uses two inputs, an XOR gate and an AND gate, and is used two add two digits, and carry over that number two the next adder.  On the other hand, a Full-Adder adds three bits, and is comprised of three inputs, two XOR gates, two AND gates and an OR gate.  They also produce a sum and a carry.  In processors many of these adders will be used to perform simple calculations.


AND gate
Both inputs must be true for the output to be true.
Input
Output
A
B
C
0
0
0
0
1
0
1
0
0
1
1
1
OR gate
Used to express that either input or both being true will give an output that is true.
Input
Output
A
B
C
0
0
0
0
1
1
1
0
1
1
1
1
NOT gate
The input must be false for the output to be true.  These logic gates will only have one output.
Input
Output
A
C
0
1
1
0
XOR gate (extended OR)
Used to express that either output but not both being true will give an output that is true.
Input
Output
A
B
C
0
0
0
1
0
1
0
1
1
1
1
0
NAND gate (not AND)
As long as both of the inputs aren’t true then the outputs won’t be true.
Input
Output
A
B
C
0
0
1
1
0
1
0
1
1
1
1
0
NOR gate (not OR)
Only if both inputs are false will the output be true.
Input
Output
A
B
C
0
0
1
1
0
0
0
1
0
1
1
0
XNOR gate (extended NOR)
If neither or both of the inputs are true, then the output will be true.  Therefore, if one input is true and the other is false then the output will be false.
Input
Output
A
B
C
0
0
1
1
0
0
0
1
0
1
1
1

Tuesday, 2 November 2010

Secondary Storage Methods


Storage Medium
Capacity
Information
CD
700MB
A disk format that works by using a laser to read and write data on/to   disks.  A CD can be a CD-ROM (read-only), CD-R (write once only) or CD-RW (rewritable).  Although data can be copied off of a CD-ROM it cannot have data written to it, and as such is described as ROM because it is read-only memory.  A CD-R can be written to by a CD writer, using a laser to change some of the 0s to 1s, though this process can only be done once because of the nature the disk.  On the other hand a CD-RW can be wiped an infinite amount of times by using a laser to set all binary digits to 0, then by writing in the same fashion to a CD-R.
  CD-ROMs have been used for many years for distributing software and music, whilst CD-Rs and CD-RWs may be used for backups or archiving data.
DVD
4.7 GB (single layer)
9.4 GB (dual layer)
A similar technology to CDs although much more can be stored.  As such they can also be DVD-ROM, DVD-R or DVD-RW, and the writable and rewritable forms are written in the same manner as CD-Rs and CD-RWs.
  This disk format in the ROM form is most commonly used now for non-HD films and software for both computers and games consoles, whilst the R and RW forms are also used for backups and archiving.
HD-DVD
15 GB (one layer)
30 GB (two layers)
A now abandoned format that once competed with Blu-Ray, and was a type of DVD that could store much more data.  They are too suitable for storing HD film though can store less of it.
Blu-Ray
25 GB (one layer)
50 GB (two layers)
A superior disc format that can store large quantities of data.  They can store 6x the amount that a conventional DVD can store, and like HD-DVD are read by a blue laser.  This is because it is higher frequency than the red laser found in CD and DVD drives.  Nowadays these are the universal format for watching HD films, and are also used as a storage medium for PS3 games.
Hard Drive Disk
Up to 2TB
The hard drive disk is the ultimate form of storage.  It is a physical medium that is used to store very large amounts of data, and may store a variety of things such as programs, games, documents and much more. 
  Hard drives contain a magnetic disk and a reading head, which acquires the data needed in a particular order, reading this data from sectors which are in tracks that are the concentric circles around the disk.  As the disk rotates the head also moves to read sectors off of different tracks and to not read any sectors which aren’t the right ones.  The head switches to the required track, waits until the required sector is reached, reads the data and moves onto to the next required sector in the same fashion.  It does this in order until all the required data is read.  A fragmented file may be stored in up to six different sectors.
Magnetic Tape
Up to 800GB
Magnetic tapes contain a magnetic ribbon-like tape that can store binary digits that is also read by a head.  This means that data can be stored, although every time a different piece of data needs to be accessed the tape has to be wound to the right place which is time consuming.  These tapes are often used for archiving and backing up files.
Floppy Disk
Up to 1.4MB
Floppy disks are a now defunct format which was once used to transfer small files and act as boot-up disks for when a computer is first used.  Each one contained a magnetic disk which was read by a head in the computer’s disk drive.  As such they worked in a way similar to the way that hard drives work.
USB Flash
64 GB and it is only a matter of time before it is more….
Both USB flash sticks and memory cards are flash memory storage mediums.  Whilst USB sticks are connected to USB ports on a computer, memory cards are plugged into unique slots.  Memory cards may also be used in small devices such as mobile phones or digital cameras.  Flash memory refers to a rewritable chip which is considered to be non-volatile, due to the way that it does not need to be powered to retain data.  Because of their portability and ever-growing capacity these devices are now often used instead of floppy disks for the purpose of file transfer.
Memory Card


Inputs and Outputs

Input and output devices are peripherals, and whilst inputs are used to input data and instructions into a computer, output devices either transfer information to another system or medium, or somehow get into the outside world so it can be seen or heard by humans.
                One of the most important input devices in computing is the mouse, which is used to give basic commands to the computer within some kind of graphical interface, which is a type of operating system.  Either using a wireless sensor or traditionally a motion-tracking ball, the mouse registers movement of the mouse along an XY axis to detect its position in relation to where it should be on the screen.  Even more important is the keyboard, which is a device that was traditionally used to input text or numbers.  As each key is pressed it relates it to a command for something (e.g. delete) to occur or ASCII code (binary number) so that a number or letter may be displayed.
  Using a microphone to have a voice input is also considered to be important in modern times, as voice recognition means that a computer can relate what is said to a command using software.  Different commands like ‘start’ or ‘save’ can be given, in addition to the ability to dictate information to be stored, for example in a word document.  Additionally contemporary digital cameras and camcorders may transfer photos and videos to a computer using a USB connection or a by plugging its memory card into the computer.  These devices detect light intensity using charged-coupled-devices to build up images.
  Two other devices used frequently nowadays are Tablet PCs and touch sensitive devices such as E-readers.  Touch screens let a user interact with a piece of software through using touch, and work by beaming infrared light across the screen, and when a beam is broken it can detect where this has occurred because of photoelectric sensors at the ends of the beams.  Circuits connected to these sensors then relate where the beam has been broken to an XY coordinate, which the computer then relates to a specific command.
  On the other hand, graphics tablets work in a different way as each time the pen (known as a stylus) is pressed against the screen it activates a microswitch, which causes the computer to register its movement, and the electronics in the screen itself detects the pen touching the screen and the pressure applied.  An alternative version of these graphics tablets work by using a puck with buttons and cross hairs.  After a line drawing is done the puck is used to align the drawing with the cross hairs which are detected by the tablet.  The graphics tablet then detects the position of these cross hairs and creates a digital representation of it. 
  Another type of input device is a reader, and one example of this is barcode readers for which reflect light onto black and white striped barcodes and register where the light has and has not shined back, which is detected by photoelectric sensors, and is translated from an optical form to a binary number.  This binary number is then generally related to an item in a database, such as a food item in a supermarket. 
  A different type of readers are magnetic strip readers that scan the charged magnetic strips on the back of cards which contain binary digits, and relate these to a specific number to transfer a small amount of information such as an identification code.  However many of these are now being replaced by the more secure smart card readers which read the magnetic strips and decrypt encrypted data on a chip, which can be used for a security code.  Each chip contains a small processor, some ROM and RAM which stores temporary data and EEPROM which stores permanent data.  The other type of reader is a Radio Frequency Identification Reader, which receives information from a transponder that contains an antenna for transmitting information, and a microchip to conduct this process.  These are often used for security purposes, such as identifying luggage in an airport.
                Lastly, scanners beam light across a page to attain a digital image or form of an object, generally something on a piece of paper.  Flatbed scanners work by moving light sensors and a very bright light below a pane of glass to detect where the light is absorbed and where it is reflected to build up a picture of what has been scanned.  A colour scanner will contain differently coloured lights are used to detect the intensity of the primary colours in what is reflected to identify each shade and colour mix in each pixel, although a black and white only has a bright white light, and as such only different shades and not colours can be distinguished.
  Optical Mark Readers shine light on a page and detect where light has been reflected and where it has not, to identify where a page has been marked.  It converts the photoelectric readings into binary numbers to identify ‘yes’ and ‘no’.  Where a mark has been made it will often be a ‘yes’ (1), and where there is no mark a ‘no’ (0).  On the other hand Optical Character Readers use optical scanners to recognize characters such as letters or numbers and translate them into binary digits, which can either be used for uploading handwritten documents to a computer or organize documents.
  The other three types of scanners scan fingerprints, and the retina and iris in the eye.  These all work similarly as they shine light at the target and analyze what is sent back.  However, whilst the fingerprint scanner uses light to judge the depth of depressions dependent on the time it takes them to return, iris scanners analyze what is reflected and record a pattern whilst retina scanners convert the reflected light into a unique image of the eye.  It must also be noted that both iris and retina scanners use low intensity light for safety purposes, and that retina scanners use infrared light to create a more accurate picture.
                One of the main types of output is a display, of which there are three types.  Cathode Ray Tube (CRT) displays work by using a light tube which beams electrons against a phosphor coated screen that then reflects what is sent by the tube, making it visible on the screen.  This process happens many times per second to make sure that the image does not appear to flicker.  However, colour CRT displays work by using three sources of electrons – red, blue and green to create different intensities of these colours and mix these colours to create others on screen.
  Liquid Crystal Displays work by having their liquid crystals polarized by a source of electrons to create different colours.  These monitors may also contain filters to vary the shades of colours, and each liquid crystal also contains a TFT and capacitor which are responsible for changing the polarization of the light.  Because of the way they do not project an image they use less energy and are as such more efficient.
  Alternatively, plasma screens have a gas which is superheated to become plasma and release ultraviolet light.   They have light shined through this to create colours in a similar way to LCDs in the pixels.  However, plasma screens often have contrast issues because they have to be constantly primed by having a low voltage applied to each pixel, or otherwise they would respond slowly.  Additionally they are inefficient because they create a high amount of heat, though are used regularly for large screens.
  Two other practical output devices are speech output where words on the screen are outputted as sound, and electronic paper which uses beads that respond to when an electrically charged pencil is moved across them to show what has been inputted.
  Finally, printers are an output device used to print what is on a computer’s display onto paper.  An impact printer works by impacting different pins in a pattern against an ink ribbon, and then printing this pattern onto the paper.  Although they are noisy and slow, they are efficient and robust.  The three types of non-impact printers are inkjet printers, laser printers and plotter printers.  Inkjet printers fire differently coloured inks on the page and mix them to create the desired colours, printing one line at a time.  They create different colours out of cyan, magnenta, yellow and black.
 Laser printers use a similar technique to a photocopier through attracting toner to charged areas, and plotter printers work by using a pen like device which moves across the page to draw on the paper – and are used for large scale items.  They work by moving across the X and Y axis at the same time and the paper may be moved by the drum.  All three types of non-impact printers work by using a non-physical contact such as through charging the paper.

Thursday, 21 October 2010

Types and Functions of Software

Lately in my computing lessons I have been learning about the different types and functions of software.  Software refers to instructions which can be understood and executed by the hardware, whilst hardware itself is the physical electronic parts of a computer including a processor and memory.  The two main types of software are System Software which runs the hardware, and Application Software which lets the user do non-computer tasks.
  The different types of Application Software relate to different functions, and these are simple General Purpose programs like word processors which can perform a variety of tasks, Special Purpose programs like media players or web browsers which only have one primary function, and Bespoke tailor made programs like CCTV systems which are expensive and have one very specific and complex function.  On the other hand the four types of System Software are Operating Systems which act as a user interface (e.g. Microsoft Windows) to make the experience of using a computer less complex, Library Programs which store commonly used operations such as programming functions, Utility Programs which maintain the computer such as a program which formats the hard disk, and Translators which translate between different programming languages.
  One of the three types of Translators are Assemblers which convert assembly code into machine code which can be understood by processors.   Alternatively Compilers that compile high level languages like VB so they can be understood by the hardware (this process is done only once), whilst Interpreters  run high level language programs one line at a time, which are slow and this process has to be done every time as they produce no object code, though they are used in software development for debugging because compiling is not necessary.
  Additionally I learned about the four different generations of programming languages - which can be categorized as either low level or high level languages.  Low level languages are specific to a processor, the most basic first generation language being Machine Code which is comprised of  sequences of binary digits that can be understood by processors as instructions, whilst the second generation describes Assembly Code that consists of sequences of numbers and shorthand phrases (e.g. 'ebx') which are translated to Machine Code and executed.  Computers can only actually 'run' machine code, and all other languages must be translated to be run.  A program written in machine code or assembly code can only be run on that computer, as the way it is written is unique to the processor, meaning that they must be written in a high level language to be distributed.  On the other hand, high level languages can be used by any computer, and mean more to humans when read.  They may either be Procedural (third generation) such as Virtual Basic and consist of instructional key words (e.g. Answer = Num1 / Num2) or Declarative (fourth generation) such as SQL and specify a problem's nature instead of its solution.