1.3.1 Logic Gates

Logic circuit

Draw a logic circuit from the following logic expression

Complete the truth table from the above logic expression

Draw a logic circuit from the following logic expression

Complete the truth table from the above logic expression

Logic circuit using problem statements

Practice more

More problems

More problems

Logic circuit minimization

Some circuits can be constructed with fewer gate to produce the same output

We can simplify (minimize) the circuit by applying logical identities. Since the example states that A is true when B is false or the other way around. In terms of logical gates,inequalitysimply means anXOR gate(exclusive or)

A / B / output
0 / 1
0 / 0
1 / 1
1 / 0

1.3.2 Computer Architecture and the fetch-execute cycle

Von Neumann model

Von Neumann introduced the idea of the stored program. Previously data and programs were stored in separate memories.von Neumann realized that data and programs are indistinguishable and can therefore use the same memory.

Von Neumann architecture uses a single processor. It follows a linear sequence of fetch-decode-execute operations for sequence of instructions which makeup the program. In order to do this a processor has to use some special registers.

A register is simply a location that can store extremely limited amount of instruction or data only immediately before or after processing. The registers are outside the immediate access store and consequently allow faster access to the data they store.

Processor uses a group of special purpose registers to execute a program

v  Program counter (PC): Program counter is sometimes called sequence control register. It stores the address of the next instruction to be fetched.

v  Memory address register (MAR): When the next instruction is needed, its address is copied from the PC and placed in the memory address register.

v  Memory data registers (MDR): It is sometime called the memory buffer register (MBR) because it acts like a buffer, temporarily storing a data value before passing it on to e.g. CIR.

v  Index register (IR): Anindex registerin a computer'sCPUis aprocessor registerused for modifyingoperandaddresses during the run of a program, typically for doing vector/arrayoperations. If the address is an indexed address, add the address to the contents of the index register to form the address of actual data.

v  Current instruction register (CIR): Holds the instruction that is about to be executed.

v  Status register: Astatus register,flag register, orcondition code registeris a collection of statusflagbitsfor aprocessor. The status register is ahardware registerwhich contains information about the state of theprocessor.

Role of arithmetic logic unit (ALU), control unit (CU) and system clock

Arithmetic logic unit

Indigital electronics, anarithmetic logic unit(ALU) is adigital circuitthat performsarithmeticandbitwise logicaloperations onintegerbinary numbers. It is a fundamental building block of thecentral processing unit(CPU) found in many computers. An ALU performs basic arithmetic and logic operations. Examples of arithmetic operations are addition, subtraction, multiplication, and division. Examples of logic operations are comparisons of values such as NOT, AND, and OR.

Control unit

Thecontrol unitis a component of a computer'scentral processing unit(CPU) that directs operation of the processor. It tells the computer's memory, arithmetic/logic unit and input and output devices how to respond to a program's instructions.

It directs the operation of the other units by providing timing and control signals.All computer resources are managed by the CU (Control Unit).It directs the flow of data between the Central Processing Unit (CPU) and the other devices.

The fetch-execute cycle

Aninstruction cycle(sometimes calledfetch-and-execute cycle,fetch-decode-execute cycle, orFDX) is the basic operation cycle of a computer. It is the process by which a computer retrieves aprograminstructionfrom itsmemory, determines what actions the instruction requires, and carries out those actions. This cycle is repeated continuously by the central processing unit(CPU), frombootupto when the computer is shut down.

·  Program counter(PC)- an incrementing counter that keeps track of the memory address of the instruction that is to be executed next.

·  Memory address register(MAR)- holds the address of a memory block to be read from or written to.

·  Memory data register(MDR)- a two-way register that holds data fetched from memory (and ready for the CPU to process) or data waiting to be stored in memory.

·  Current Instruction register(IR)- a temporary holding ground for the instruction that has just been fetched from memory.

·  Control unit(CU)- decodes the program instruction in the IR, selecting machine resources such as a data source register and a particular arithmetic operation, and coordinates activation of those resources.

·  Arithmetic logic unit(ALU)- performs mathematical and logical operations.

Description in the form of flowchart

Register transfer notation

1.  [MAR] ß [PC]

2.  PC ß [PC] + 1

3.  MDR ß [[MAR]]

4.  CIR ß [MDR]

5.  DECODE

6.  EXECUTE

7.  GO TO STEP 1

Step by step description of fetch-execute-cycle

1.  Copy the address that is in program counter(pc)into the memory address register (MAR)

  1. Increment the PC (ready for next fetch)
  2. Load the instruction that is in the memory address given by the MAR into the memory data register (MDR)
  1. The MBR loads the Current Instruction Register with the instruction to be executed.

1.3.3 Input Devices

2D scanners

Scanners can be used to convert images or text on paper into a digital format that can be used by the computer. A scanner works by shining a beam of light onto the surface of the object that you are scanning. This light is then reflected back onto a sensor that detects the colour of the light. This is then used to build up the digital image. Items that are scanned are usually stored in an image format. However, special software - Optical Character Recognition - can be used to convert text on the paper into text which can be edited with a word processor. However, the text doesn't always get converted very well and you could end up with a lot of mistakes.

There are three types of scanner:

·  Flatbed scanners

·  Handheld scanners

·  Specialist scanners

The most popular type is the flatbed scanner. This is shown in the picture which has its lid raised to show the glass surface where you place the item to be scanned. This is probably the one that you use at school. They can scan larger images and are more accurate than handheld scanners.

Handheld scanners are usually only a few inches wide and are held in the hand whilst they are rolled across the document to be scanned. The images produced are generally not as large or as high quality as those captured with a flatbed scanner.

Advantages of scanners / Disadvantages of scanners /
Flatbed scanners are very accurate and can produce reasonably high quality images. / Images produced by the scanner can take up a lot of memory space.
Any image which is digitised by the scanner can then be included on electronic documents. / Images lose some quality in the scanning and digitising process.
Images once digitised can be enhanced with a graphics application. / The quality of the final image is dependent on the quality of the original image.

3D Scanners

A3D scanneris a device that analyses a real-world object or environment to collect data on its shape and possibly its appearance (e.g. colour). The collected data can then be used to construct digitalthree-dimensional models.

Many different technologies can be used to build these 3D-scanning devices; each technology comes with its own limitations, advantages and costs. Many limitations in the kind of objects that can be digitised are still present, for example, optical technologies encounter many difficulties with shiny, mirroring or transparent objects

Collected 3D data is useful for a wide variety of applications. These devices are used extensively by the entertainment industry in the production of movies and video games. Other common applications of this technology includeindustrial design

The purpose of a 3D scanner is usually to create apoint cloudof geometric samples on the surface of the subject. These points can then be used to extrapolate the shape of the subject (a process calledreconstruction). If colour information is collected at each point, then the colours on the surface of the subject can also be determined.

Bar code reader

Barcodes are used to represent information about products. A barcode is normally a pattern of thick and thin dark and light lines. A form of scanner called a barcode reader is used to read them. Some are handheld and some are built into the EPOS terminal. Like a flatbed scanner, it consists of a light source, a lens and a light sensor translating optical impulses into electrical ones. The different thicknesses of lines are converted by computer into a number.

They are used in all kinds of shops, wherever the details of products represented b code numbers need to be input. In libraries they are used to input the book number and library card number.

They are faster than typing the number in using a keypad and more accurate method of data entry compared with typing the number in.

Digital cameras

A digital camera (or digicam) is a camera that encodes digital images and videos digitally and stores them for later reproduction. Most cameras sold today are digital, and digital cameras are incorporated into many devices ranging from PDAs and mobile phones (called camera phones) to vehicles.

Digital and film cameras share an optical system, typically using a lens with a variable diaphragm to focus light onto an image pickup device. The diaphragm and shutter admit the correct amount of light to the imager, just as with film but the image pickup device is electronic rather than chemical. However, unlike film cameras, digital cameras can display images on a screen immediately after being recorded, and store and delete images from memory. Many digital cameras can also record moving videos with sound. Some digital cameras can crop and stitch pictures and performs other elementary image editing.

Keyboard

The most common input device it is used for inputting text,numbers,punctuation marks, symbols and instructions using a number of software applications. By pressing down a key completes an electrical circuit. This circuit then transmits a binary signal (commonly using ASCII) to the computer to represent the key pressed.

Ergonomic or ergonometric keyboards are shaped so that the user is less likely to suffer from RSI (repetitive strain injury).

Overlay or concept keyboards consist of an A4-sized tray that can have an overlay sheet in it. It is used by people who may have disabilities as it is easier to press a large symbol than to press the key on the keyboard.

Laser mouse

Anopticalcomputer mouseuses a light source, typically alight-emitting diode, and a light detector, such as an array ofphotodiodesor an image sensor, to detect movement relative to a surface. It is an alternative to the mechanical mouse, which uses moving parts to perform the same function.

When a mouse is connected with the computer, a red LED starts glowing. This light is focused on the surface beneath the mouse by a special type of lens (HDNS-2100). The reflected light falls back to the camera integrated in Optical Mouse Sensor. The camera takes images of the surface with a frequency in the range of 1500 to 6000 images per second to calculate the position of mouse.These images are processed by Digital Signal Processor (DSP) and resultant co-ordinates are sent to the PC. The driver of the mouse installed in the computer receives the co-ordinates and makes the cursor move on the screen accordingly.

Touch screens

A touch screen is the only device which works as both an input and an output device. You view the options available to you on the screen (output) and you then use your finger to touch the option that you have chosen (input).

Touch screens work particularly well with a menu driven interface. For example, a cashpoint (ATM) at a bank would first of all ask which service you want. You touch the option 'withdraw cash' on the screen. You are then presented with another choice, 'how much cash do you want to withdraw?’ Once you have chosen how much, you then get other options such as 'do you want a receipt?’

Another major use of touch screens are on smart phones and modern tablet computers. Each 'app' is accessed by an icon on the touch screen.

Touch screens are easy to use and are often found in public places such as cashpoints at banks, ticket collection terminals at theatres or airports, information centres at museums.

Touch screens are not commonly used to input large amounts of data because they are not very accurate and they would be tiring on the hands to use for long periods of time.

Capacitive / Infra-red / resistive
·  Made up of many layers of glass that act like a capacitor, creating electric fields between the glass plated in layers
·  The electric current changes when the top glass layer is touched which is determined by a microprocessor. / Heat sensitive
·  It uses glass as screen material which needs a warm object e.g finger to carry out input operation / Optical
·  It uses an array of sensors in the form of grid
·  The point of contact is based on which coordinated is touched. / ·  Consists of upper layer of polyester and bottom layer of glass.
·  When top layer is touched, the top and bottom layer complete a circuit.
· Signals are sent out and interpreted by a microprocessor; the calculations determine the coordinates of where the screen was touched.
Advantages
·  Screen visibility is good even in strong sunlight
·  Permits multi-touch capability.
·  Screen is very durable
·  It is a medium cost technology. / Advantages
·  Allow multi-touch capability
·  The optical system allows bare finger, gloved or stylus for input.
·  Both have good screen durability, it takes a major impact to break the glass
·  Both have fairly good visibility in strong sunlight. / ·  Advantages
·  Relatively inexpensive technology
·  Can used bare finger, gloved finger or a stylus to carry out an input operation
Disadvantages
·  It allows only bare fingers as input but latest screens permit a special stylus to be used / Disadvantages
·  Relatively expensive technology
·  Heat-sensitive only allow bare fingers to be used for input. / Disadvantages
·  Screen visibility is poor in strong sunlight.
·  Doesn’t permit multi-touch capability.
·  The screen durability is only fair and vulnerable t scratches and wears out through time.

Microphones