Вы находитесь на странице: 1из 9

Binary Numbers: A Binary Number is made up of only 0s and 1s.

Binary numbers and arithmetic let you represent any amount you want using just two digits: 0 and 1. Here are some examples: Decimal 1 is binary 0001 Decimal 3 is binary 0011 Decimal 6 is binary 0110 Decimal 9 is binary 1001 Each digit "1" in a binary number represents a power of two, and each "0" represents zero: 0001 is 2 to the zero power, or 1 0010 is 2 to the 1st power, or 2 0100 is 2 to the 2nd power, or 4 1000 is 2 to the 3rd power, or 8. When you see a number like "0101" you can figure out what it means by adding the powers of 2: 0101 = 0 + 4 + 0 + 1 = 5 1010 = 8 + 0 + 2 + 0 = 10 0111 = 0 + 4 + 2 + 1 = 7. Addition: Adding two binary numbers together is like adding decimal numbers, except 1 + 1 = 10 (in binary, that is), so you have to carry the one to the next column: 0001 + 0100 ---0101 (no carries to get this) 0001 + 0001 ---0010 (1 plus 1 is 10, carry the 1 to the next column)

0011 + 0011 ---0110 (1 + 1 = 10, so carry; then 1 + 1 + 1 = 11, so carry again) 0011 + 0101 ---1000 (carry in every column here)

That was 8 bits:

8 bits is usually called a "byte", and it's the size usually used to represent an alphabetic character -- "A" is 65, or 01000001 a "nybble" (a term seldom used) is 4 bits; a "word" depends on the computer but is often 16 or 32 bits.

Some other terms you'll hear are:


kilobyte, which is 1024 bytes (1024 is 2 to the 10th power) megabyte, which is roughly a million bytes.

Typical sizes for personal computer RAM (random access memory) are 4 to 16 megabytes, while hard disks now start around 150 megabytes. Since each byte can represent one character of the alphabet, that means a hard disk might hold something like 150 million characters, or 25 million words of "raw" text. Documents formatted in a word processor take up a lot more space, though, and the operating system and software usually fill at least 100 megabytes. Logic gate: A logic gate is an idealized or physical device implementing a Boolean function, that is, it performs a logical operation on one or more logic inputs and produces a single logic output. Logic gates are primarily implemented using diodes or transistors acting as electronic switches, but can also be constructed using electromagnetic relays (relay logic), fluidic logic,pneumatic logic, optics, molecules, or even mechanical elements. With amplification, logic gates can be

cascaded in the same way that Boolean functions can be composed, allowing the construction of a physical model of all of Boolean logic, and therefore, all of the algorithms and mathematics that can be described with Boolean logic. Logic circuits include such devices as multiplexers, registers, arithmetic logic units (ALUs), and computer memory, all the way up through complete microprocessors, which may contain more than 100 million gates. In practice, the gates are made from field-effect transistors (FETs), particularly MOSFETs (metaloxidesemiconductor field-effect transistors). Compound logic gates AND-OR-Invert (AOI) and OR-AND-Invert (OAI) are often employed in circuit design because their construction using MOSFETs is simpler and more efficient than the sum of the individual gates. Logic gates process signals which represent true or false. Normally the positive supply voltage +Vs represents true and 0V represents false. Other terms which are used for the true and false states are shown in the table on the right. It is best to be familiar with them all. Gates are identified by their function: NOT, AND, NAND, OR, NOR, EX-OR and EX-NOR. Capital letters are normally used to make it clear that the term refers to a logic gate. Note that logic gates are not always required because simple logic functions can be performed with switches or diodes:

Switches in series (AND function) Switches in parallel (OR function) Combining IC outputs with diodes (OR function)

The inverting circle (o): Some gate symbols have a circle on their output which means that their function includes inverting of the output. It is equivalent to feeding the output through a NOT gate. For example the NAND (Not AND) gate symbol shown on the right is the same as an AND gate symbol but with the addition of an inverting circle on the output. NOT gate (inverter) The output Q is true when the input A is NOT true, the output is the inverse of the input: Q = NOT A A NOT gate can only have one input. A NOT gate is also called an inverter.

Input A Output Q 0 1 1 0

Traditional symbol

Truth Table

AND gate The output Q is true if input A AND input B are both true: Q = A AND B An AND gate can have two or more inputs, its output is true if all inputs are true. Input A Input B Output Q 0 0 1 1 0 1 0 1 0 0 0 1

Traditional symbol

Truth Table

NAND gate (NAND = Not AND) This is an AND gate with the output inverted, as shown by the 'o' on the output. The output is true if input A AND input B are NOT both true: Q = NOT (A AND B) A NAND gate can have two or more inputs, its output is true if NOT all inputs are true.

Input A Input B Output Q 0 0 1 1 0 1 0 1 1 1 1 0

Traditional symbol

Truth Table

OR gate The output Q is true if input A OR input B is true (or both of them are true): Q = A OR B An OR gate can have two or more inputs, its output is true if at least one input is true. Input A Input B Output Q 0 0 1 1 0 1 0 1 0 1 1 1

Traditional symbol

Truth Table

NOR gate (NOR = Not OR) This is an OR gate with the output inverted, as shown by the 'o' on the output. The output Q is true if NOT inputs A OR B are true: Q = NOT (A OR B) A NOR gate can have two or more inputs, its output is true if no inputs are true.

Input A Input B Output Q 0 0 1 1 0 1 0 1 1 0 0 0

Traditional symbol

Truth Table

EX-OR (EXclusive-OR) gate The output Q is true if either input A is true OR input B is true, but not when both of them are true: Q = (A AND NOT B) OR (B AND NOT A) This is like an OR gate but excluding both inputs being true. The output is true if inputs A and B are DIFFERENT. EX-OR gates can only have 2 inputs. Input A Input B Output Q 0 0 1 1 0 1 0 1 0 1 1 0

Traditional symbol

Truth Table

EX-NOR (EXclusive-NOR) gate This is an EX-OR gate with the output inverted, as shown by the 'o' on the output. The output Q is true if inputs A and B are the SAME (both true or both false): Q = (A AND B) OR (NOT A AND NOT B) EX-NOR gates can only have 2 inputs. Input A Input B Output Q 0 0 1 1 0 1 0 1 1 0 0 1

Traditional symbol

Truth Table

Functional Units:A computer has five functionally independent main parts:


Input Unit Memory Unit Arithmetic and logic Unit Output Unit Control unit

Input Unit:Computers accept coded information through input units, which read the data. The most wellknown input device is keyboard. Whenever a key is pressed, the corresponding letter or digit is automatically translated into its corresponding binary code and transmitted over a cable to either the memory or the processor. Memory Unit:The function of the memory unit is to store programs and data. There are two classes of storage, called Primary and Secondary.

Primary storage is a fast memory that operates at electronic speeds. Programs must be stored in the memory while they are being executed. Memory in which any location can be reached in a short and fixed amount of time after specifying its address is called Random Access Memory(RAM). The time required to access one word is called the Memory Access Time. Although Primary Storage is essential, it tends to be expensive. Thus additional, cheaper, secondary storage is used when large amounts of data and many programs have to be stored, particularly for information that is accessed infrequently. Ex:magnetic disks and tapes and optical disks.

Arithmetic and Logic Unit:All the arithmetic or logic operation, is initiated by bringing the required operands into the processor, where the operation is performed by the ALU.

Output Unit:Its function is to send processed result to the outside world. Ex:- Printer. Control Unit:The Control Unit is used to co-ordinate the operations of memory, ALU, input and output units. The Control Unit can be said as the nerve center that sends control signals to other units and senses their states.

Вам также может понравиться