Create four computers by yourself

Source: Internet
Author: User

Create four computers by yourself

Create a four-digit computer by yourself

Have you ever wondered why Computers add, subtract, multiply, and divide? Or, more directly, what is the principle of the computer?

1. What is binary?

First, let's start with the simplest one.

The computer uses binary data. Each digit has only two possibilities: "0" and "1". The calculation rule is "every two to one ". For example, there are two bits A and B, and they can only have four results.

This table is called the truth table, where sum represents "and bit", and carry represents "carry ". If A and B are both 0 and 0, the "and bit" and "carry" are both 0. If one of A and B is 1, the other is 0, and the sum is 1, carry is not required. If both A and B are 1 and 10, "and bit" is 0, and "carry" is 1.

Ii. Logic Gate) <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + sry2 + 9TLy + release/release + release/bj2u/mxvtTLy + O3 + release/release + zxqGxwt + release + oaGhoUFORKO6yOe5 + release + authorization/authorization + zcrks/Yxo7tOT1SjqLfHw8WjqbXE1/fTw6Os1PLKx8rks/authorization + authorization = "http://www.2cto.com/uploadfile/Collfiles/20150122/2015012209420150.png" width = "400" height = "200" alt = "\">

3. logical gate representation of truth table

Now, the calculation rule of "truth table" is rewritten to the logic gate form.

First, let's look at sum (and bit). What we need is this logic: When two inputs are not the same, the output is 1, so the operator should be OR. When two inputs are the same, the output is 0, which can be implemented by combining the two groups of and not. The final logical combination diagram is as follows:


Let's look at carry ). It is relatively simple. If both input a and input B are 1, 1 is output; otherwise, 0 is output, so you can use an AND operator.


Now combine sum and carry to get the whole truth table. This is called the half-adder, because it only considers the addition of two separate bits, and does not consider the possibility of a low bits.


4. Extended truth tables and full Processors

If we use the low-level incoming bits as the third input (input), that is to say, in addition to two input values A and B, there is also an input carry, the problem is how to get the sum (sum) and carry (carry) of the output (output) with three inputs ).

In this case, the truth table is extended into the following form:

If you understand the design concept of the half-adder, it is not difficult to extend it to the new truth table. This is the "full-adder.

V. Series of full Processors

Multiple full processors are connected in tandem to perform binary multi-bit operations.

First, describe the all processors in the form of squares, indicating three inputs (A, B, Cin) and two outputs (S and Cout ).

Then, the four encoders are connected in series to obtain the logic diagram of the four encoder.

6. What is the solid filling of the transistor in the logic gate? Http://www.bkjia.com/kf/yidong/wp/ "target =" _ blank "class =" keylink "> keys/keys + z8i/keys + keys/bOqjGhozwvcD4KPHA + IDxpbWcgc3JjPQ =" http://www.2cto.com/uploadfile/Collfiles/20150122/2015012209420463.png" width = "400" height = "200" alt = "\">

AND. This requires two transistors. Only when the input of the two base poles is 1 (high level) will the current flow to the output end and get 1.

The last is OR. This also requires two transistors. As long as one of the two base poles is 1 (high level), the current will flow to the output end and get 1.

VII. Circuit of the all-processors

The three logic gate transistor implementation, into the full amplifier design, you can draw a circuit diagram.

According to the circuit diagram, an integrated circuit with a transistor and a circuit board is assembled into a full amplifier.


The three yellow lines on the left represent three inputs A, B, and Cin, and the two green lines on the right represent output S and Cout respectively.

8. Create a computer

Concatenate the circuits of the four full processors into a real four-bit transistor computer. The computation is 0000 ~ The addition between 1111.

There are two groups of four switches under the circuit board, marked with "A" and "B", representing the two inputs. As you can see, group A's switch is "Up and down", representing 1011 (11); group B's switch is "Up and down", representing 1000 (8 ). The result of their addition is represented by five LED lights. The center is "bright, dark, bright", representing 10011 (19), which is the sum of 1011 and 1000.

IX. Conclusion

Although the four computers are very simple, it is not difficult to understand the principles of modern computers.

88 transistors are required to complete the above four-bit addition. Although contemporary processors contain hundreds of millions of transistors, they are essentially the accumulation of such simple circuits.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.