Saturday, May 9, 2009

23) ELECTRONIC DIGITAL CIRCUITS

by engr. AFAN BAHADUR KHAN



Digital circuits are electric circuits based on a number of discrete voltage levels. Digital circuits are the most common physical representation of Boolean algebra and are the basis of all digital computers. To most engineers, the terms "digital circuit", "digital system" and "logic" are interchangeable in the context of digital circuits. Most digital circuits use two voltage levels labeled "Low"(0) and "High"(1). Often "Low" will be near zero volts and "High" will be at a higher level depending on the supply voltage in use. Ternary (with three states) logic has been studied, and some prototype computers made.

Computers, electronic clocks, and programmable logic controllers (used to control industrial processes) are constructed of digital circuits. Digital Signal Processors are another example.

Building-blocks:

Logic gates
Adders
Binary Multipliers
Flip-Flops
Counters
Registers
Multiplexers
Schmitt triggers



1- Logic gate



A logic gate performs a logical operation on one or more logic inputs and produces a single logic output. The logic normally performed is Boolean logic and is most commonly found in digital circuits. Logic gates are primarily implemented electronically using diodes or transistors, but can also be constructed using electromagnetic relays, fluidics, optics, molecules, or even mechanical elements.

In electronic logic, a logic level is represented by a voltage or current, (which depends on the type of electronic logic in use). Each logic gate requires power so that it can source and sink currents to achieve the correct output voltage. In logic circuit diagrams the power is not shown, but in a full electronic schematic, power connections are required.



2- Adder


In electronics, an adder or summer is a digital circuit that performs addition of numbers. In modern computers adders reside in the arithmetic logic unit (ALU) where other operations are performed. Although adders can be constructed for many numerical representations, such as Binary-coded decimal or excess-3, the most common adders operate on binary numbers. In cases where twos complement or ones complement is being used to represent negative numbers, it is trivial to modify an adder into an adder-subtracter. Other signed number representations require a more complex adder.



3- Binary multiplier


A binary multiplier is a electronic circuit used in digital electronics, such as a computer, to multiply two binary numbers. It is built using binary adders.



4- Flip-flop



In digital circuits, a flip-flop is a term referring to an electronic circuit (a bistable multivibrator) that has two stable states and thereby is capable of serving as one bit of memory. Today, the term flip-flop has come to mostly denote non-transparent (clocked or edge-triggered) devices, while the simpler transparent ones are often referred to as latches; however, as this distinction is quite new, the two words are sometimes used interchangeably (see history).

A flip-flop is usually controlled by one or two control signals and/or a gate or clock signal. The output often includes the complement as well as the normal output. As flip-flops are implemented electronically, they require power and ground connections.



5- Counter


In digital logic and computing, a counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship to a clock signal. In practice, there are two types of counters:

up counters, which increase (increment) in value
down counters, which decrease (decrement) in value


6- Processor register


In computer architecture, a processor register is a small amount of storage available on the CPU whose contents can be accessed more quickly than storage available elsewhere. Most, but not all, modern computer architectures operate on the principle of moving data from main memory into registers, operating on them, then moving the result back into main memory—a so-called load-store architecture. A common property of computer programs is locality of reference: the same values are often accessed repeatedly; and holding these frequently used values in registers improves program execution performance.

Processor registers are at the top of the memory hierarchy, and provide the fastest way for a CPU to access data. The term is often used to refer only to the group of registers that are directly encoded as part of an instruction, as defined by the instruction set. More properly, these are called the "architectural registers". For instance, the x86 instruction set defines a set of eight 32-bit registers, but a CPU that implements the x86 instruction set will often contain many more registers than just these eight.

Allocating frequently used variables to registers can be critical to a program's performance. This action, namely register allocation is performed by a compiler in the code generation phase.



7- Multiplexer



In electronics, a multiplexer or mux (occasionally the term muldex or muldem[1] is also found, for a combination multiplexer-demultiplexer) is a device that performs multiplexing; it selects one of many analog or digital input signals and forwards the selected input into a single line. A multiplexer of 2n inputs has n select bits, which are used to select which input line to send to the output.

An electronic multiplexer makes it possible for several signals to share one device or resource, for example one A/D converter or one communication line, instead of having one device per input signal.

In electronics, a demultiplexer (or demux) is a device taking a single input signal and selecting one of many data-output-lines, which is connected to the single input. A multiplexer is often used with a complementary demultiplexer on the receiving end.

An electronic multiplexer can be considered as a multiple-input, single-output switch, and a demultiplexer as a single-input, multiple-output switch. The schematic symbol for a multiplexer is an isosceles trapezoid with the longer parallel side containing the input pins and the short parallel side containing the output pin. The schematic on the right shows a 2-to-1 multiplexer on the left and an equivalent switch on the right. The sel wire connects the desired input to the output.



8- Schmitt trigger


In electronics, a Schmitt trigger is a comparator circuit that incorporates positive feedback.

When the input is higher than a certain chosen threshold, the output is high; when the input is below another (lower) chosen threshold, the output is low; when the input is between the two, the output retains its value. The trigger is so named because the output retains its value until the input changes sufficiently to trigger a change. This dual threshold action is called hysteresis, and implies that the Schmitt trigger has some memory.

The benefit of a Schmitt trigger over a circuit with only a single input threshold is greater stability (noise immunity). With only one input threshold, a noisy input signal near that threshold could cause the output to switch rapidly back and forth from noise alone. A noisy Schmitt Trigger input signal near one threshold can cause only one switch in output value, after which it would have to move beyond the other threshold in order to cause another switch.

Friday, May 1, 2009

22) ELECTRONIC ANALOG COMPUTERS

by engr. AFAN BAHADUR KHAN




An analog computer (spelt analogue in British English) is a form of computer that uses continuous physical phenomena such as electrical, mechanical, or hydraulic quantities to model the problem being solved.



Timeline of analog computers



The Antikythera mechanism is believed to be the earliest known mechanical analog computer. It was designed to calculate astronomical positions. It was discovered in 1901 in the Antikythera wreck off the Greek island of Antikythera, between Kythera and Crete, and has been dated to circa 100 BC. Devices of a level of complexity comparable to that of the Antikythera mechanism would not reappear until a thousand years later.



the first analog computer


The astrolabe was invented in the Hellenistic world in either the first or second centuries BC and is often attributed to Hipparchus. A combination of the planisphere and dioptra, the astrolabe was effectively an analog computer capable of working out several different kinds of problems in spherical astronomy.



Muslim astronomers later produced many different types of astrolabes and used them for over a thousand different problems related to astronomy, astrology, horoscopes, navigation, surveying, timekeeping, Qibla (direction of Mecca), Salah (prayer), etc.


Abū Rayhān al-Bīrūnī invented the first mechanical geared lunisolar calendar astrolabe, an early fixed-wired knowledge processing machine with a gear train and gear-wheels, circa 1000 AD.


The Planisphere was a star chart astrolabe also invented by Abū Rayhān al-Bīrūnī in the early 11th century.


The Equatorium was an astrometic calculating instrument invented by Abū Ishāq Ibrāhīm al-Zarqālī (Arzachel) in Islamic Spain circa 1015.


The "castle clock", an astronomical clock invented by Al-Jazari in 1206, is considered to be the first programmable analog computer. It displayed the zodiac, the solar and lunar orbits, a crescent moon-shaped pointer travelling across a gateway causing automatic doors to open every hour, and five robotic musicians who play music when struck by levers operated by a camshaft attached to a water wheel. The length of day and night could be re-programmed every day in order to account for the changing lengths of day and night throughout the year.


An astrolabe incorporating a mechanical calendar computer and gear-wheels was invented by Abi Bakr of Isfahan in 1235.




The slide rule is a hand-operated analog computer for doing multiplication and division, invented around 1620–1630, shortly after the publication of the concept of the logarithm.


The differential analyser, a mechanical analog computer designed to solve differential equations by integration, using wheel-and-disc mechanisms to perform the integration. Invented in 1876 by James Thomson (engineer), they were first built in the 1920s and 1930s.


By 1912 Arthur Pollen had developed an electrically driven mechanical analog computer for fire-control system, based on the differential analyser. It was used by the Imperial Russian Navy in World War I.


World War II era gun directors and bomb sights used mechanical analog computers.


The MONIAC Computer was a hydraulic model of a national economy first unveiled in 1949.


Computer Engineering Associates was spun out of Caltech in 1950 to provide commercial services using the "Direct Analogy Electric Analog Computer" ("the largest and most impressive general-purpose analyzer facility for the solution of field problems") developed there by Gilbert D. McCann, Charles H. Wilts, and Bart Locanthi.


Heathkit EC-1, an educational analog computer made by the Heath Company, USA c. 1960.


Comdyna GP-6 analog computer introduced in 1968 and produced for 36 years.


Electronic analog computers



The similarity between linear mechanical components, such as springs and dashpots, and electrical components, such as capacitors, inductors, and resistors is striking in terms of mathematics. They can be modeled using equations that are of essentially the same form.



Polish analog computer AKAT-1

However, the difference between these systems is what makes analog computing useful. If one considers a simple mass-spring system, constructing the physical system would require buying the springs and masses. This would be proceeded by attaching them to each other and an appropriate anchor, collecting test equipment with the appropriate input range, and finally, taking (somewhat difficult) measurements.

The electrical equivalent can be constructed with a few operational amplifiers (Op amps) and some passive linear components; all measurements can be taken directly with an oscilloscope. In the circuit, the (simulated) 'mass of the spring' can be changed by adjusting a potentiometer. The electrical system is an analogy to the physical system, hence the name, but it is less expensive to construct, safer, and easier to modify. Also, an electronic circuit can typically operate at higher frequencies than the system being simulated. This allows the simulation to run faster than real time, for quicker results.





The drawback of the mechanical-electrical analogy is that electronics are limited by the range over which the variables may vary. This is called dynamic range. They are also limited by noise levels.

These electric circuits can also easily perform other simulations. For example, voltage can simulate water pressure and electric current can simulate water flow in terms of cubic metres per second.

A digital system uses discrete electrical voltage levels as codes for symbols. The manipulation of these symbols is the method of operation of the digital computer. The electronic analog computer manipulates the physical quantities of waveforms, (voltage or current). The precision of the analog computer readout is limited chiefly by the precision of the readout equipment used, generally three or four significant figures. The digital computer precision must necessarily be finite, but the precision of its result is limited only by time. A digital computer can calculate many digits in parallel, or obtain the same number of digits by carrying out computations in time sequence.


Analog digital hybrid computers



There is an intermediate device, a 'hybrid' computer, in which an analog output is convert into standard digits. The information then can be sent into a standard digital computer for further computation. Because of their ease of use and because of technological breakthroughs in digital computers in the early 70s, the analog-digital hybrids were replacing the analog-only systems. Hybrid computers are used to obtain a very accurate but not very mathematically precise 'seed' value, using an analog computer front-end, which value is then fed into a digital computer iterative process to achieve the final desired degree of precision. With a three or four digit precision, highly accurate numerical seed, the total computation time necessary to reach the desired precision is dramatically reduced, since many fewer digital iterations are required (and the analog computer reaches its result almost instantaneously). Or, for example, the analog computer might be used to solve a non-analytic differential equation problem for use at some stage of an overall computation (where precision is not very important). In any case, the hybrid computer is usually substantially faster than a digital computer, but can supply a far more precise computation than an analog computer. It is useful for real-time applications requiring such a combination (e.g., a high frequency phased-array radar or a weather system computation).



Mechanisms





In analog computers, computations are often performed by using properties of electrical resistance, voltages and so on. For example, a simple two variable adder can be created by two current sources in parallel. The first value is set by adjusting the first current source (to say x milliamperes), and the second value is set by adjusting the second current source (say y milliamperes). Measuring the current across the two at their junction to signal ground will give the sum as a current through a resistance to signal ground, i.e., x+y milliamperes. (See Kirchhoff's current law) Other calculations are performed similarly, using operational amplifiers and specially designed circuits for other tasks.

The use of electrical properties in analog computers means that calculations are normally performed in real time (or faster), at a significant fraction of the speed of light (in the case of purely arithmetic operations), without the relatively large calculation delays of digital computers. This property allows certain useful calculations that are comparatively "difficult" for digital computers to perform, for example numerical integration. Analog computers can integrate a voltage waveform, usually by means of a capacitor, which accumulates charge over time.

Nonlinear functions and calculations can be constructed to a limited precision (three or four digits) by designing function generators— special circuits of various combinations of capacitance, inductance, resistance, in combination with diodes (e.g., Zener diodes) to provide the nonlinearity. Generally, a nonlinear function is simulated by a nonlinear waveform whose shape varies with voltage (or current). For example, as voltage increases, the total impedance may change as the diodes successively permit current to flow.

Any physical process which models some computation can be interpreted as an analog computer. Some examples, invented for the purpose of illustrating the concept of analog computation, include using a bundle of spaghetti as a model of sorting numbers; a board, a set of nails, and a rubber band as a model of finding the convex hull of a set of points; and strings tied together as a model of finding the shortest path in a network.



Components



Analog computers often have a complicated framework, but they have, at their core, a set of key components which perform the calculations, which the operator manipulates through the computer's framework.

Key hydraulic components might include pipes, valves or towers; mechanical components might include gears and levers; key electrical components might include:

potentiometers

operational amplifiers

integrators

fixed-function generators

The core mathematical operations used in an electric analog computer are:

summation

inversion

exponentiation

logarithm

integration with respect to time

differentiation with respect to time

multiplication and division

Differentiation with respect to time is not frequently used. It corresponds in the frequency domain to a high-pass filter, which means that high-frequency noise is amplified.





A 1960 Newmark analogue computer, made up of five units. This computer was used to solve differential equations and is currently housed at the Cambridge Museum of Technology




Limitations


In general, analog computers are limited by real, non-ideal effects. An analog signal is composed of four basic components: DC and AC magnitudes, frequency, and phase. The real limits of range on these characteristics limit analog computers. Some of these limits include the noise floor, non-linearities, temperature coefficient, and parasitic effects within semiconductor devices, and the finite charge of an electron. For commercially available electronic components, ranges of these aspects of input and output signals are always figures of merit.


Practical examples



These are examples of analog computers that have been constructed or practically used:

Antikythera mechanism

astrolabe

differential analyzer

Deltar

Kerrison Predictor

mechanical integrator (the planimeter) is an example of a m.i.)

MONIAC Computer (hydraulic model of UK economy)

nomogram

Norden bombsight

operational amplifier

planimeter

Rangekeeper

slide rule

thermostat

tide predictor

Torpedo Data Computer

Torquetum

Water integrator

Mechanical computer

Analog synthesizers can also be viewed as a form of analog computer, and their technology was originally based on electronic analog computer technology.