#  Digital electronics (Introduction)

In this subject we are going to extend the knowledge of the electronics only that from another approach. First of all,   what is the digital electronics and why premium on the rest.

In a circuit of traditional electronics, the value of an exit can take infinites values and therefore, we can exactly decide that a value corresponds to a determined letter, for example the 2.5 volts to, 2.6 volts exactly b, etc.

The semiconductors change the form to work when it increases the temperature. This means that one to in winter can be a b in summer€

The way to solve it is with the digital electronics that only allows two states, that is to say, in state of it cuts and state of saturation (interrupting closed and interrupting opened). A change of the temperature is not going to affect to the result.

Making specific, we can cause that a transistor in cuts corresponds to Or binary and one in saturation to a 1 binary one. In the image of the left we have a transistor that is not fed in the base, this means that there is no basic current and the transistor is in cuts. If there is no current in the collector, the collector tension is going to be the tension of the battery, that is 9 volts, that correspond to a digital value (the 0 or the 1, according to the criterion) Now we polarized the transistor, enters current basic, the transistor leads (enters saturation) and the collector tension is approximately zero volts (corresponding to the other digital value).

We show in the following image with equivalence of the transistors and a switch.  ## Binary system, Hexadecimal Decimal and

First we will see the Binary relation between and decimal.  Our system to count denominates decimal because we used 10 values different to represent any number, or the 1, 23, 58 In the binary system has only two, the zero and the 1 and is going to study how we can happen from a system to another one.

But the simple thing are to count since we do it in decimal, considering that when we arrived at the 9, the following number is the 10, that is to say, has exhausted the number and must create 2 (the 1 of the 10) to be able to count again.

In the binary system he is equal, so that when we arrived at 1, we passed it to 0 and we created a new value to the left.

Of this form we have:

0, 1, 10, 11, 100, 101, 110, 111, 1000   You understand the logic?

In order to pass a decimal to binary we can use the system of the division, by which, we always divided by 2 until we arrived at a quotient of 0 or 1. We can see of graphical form: It is taken from the quotient to 1 of the rest, therefore number 50 would be 110010.

We can verify if the solution is correct. For it, we applied the following process:

`The bit of order n multiplies by and elevated to order n and all the terms are added. For the previous case we have:`

0 x2

°+ 1 X2 ¹ + 0 X2 ² + 0 X2 ³ +1 X2 †‘4 + 1 X2†‘5 =

0 + 2 + 0 + 0 + 16 + 32 = 50

In addition, a decimal number, aside from going to binary, can be happened to a called form canonical formed by letters, so that for the first bit we used a, so that when is 1 it is put to and if the bit is zero puts a'. We put an example Number five is 101 and therefore it will beab'

c . Also it is possible to be used for a zero horizontal one on the letter, so that we have:

This will be to us very useful to call to each data line by a letter.

 In the hexadecimal system, the process is the same, only that as we have 16 different characters, we needed to use letters, so that the 10 correspond to the A, the 11 to the B, etc decimal number binary number Hexadecimal number 8 1000 8 9 1001 9 10 1010 A 11 1011 B 12 1100 C 13 1101 D 14 1110 E 15 1111 F

In order to happen vice versa of the hexadecimal system to the decimal and, prodece of the same form that before, for example, the 360 in hexadecimal is 168 by the method which we saw previously.

In order to happen of hexadecimal the 168, we must:

In order to happen of decimal to hexadecimal, the number in group of 4 is grouped and it is associated to him with each one of the equivalents in hexadecimal, for example number 11110001, would be F (for the first 1111) 1 (for the following 0001) and would be number F1.

• Activities.
• To happen to hexadecimal numbers 15, 289 and 4000
• To happen to hexadecimal binary number 11011101, 100000111010 and 0011110

## To happen to binary hexadecimal numbers FA1, 110 and 12A

Boolean algebra

Boole (mathematical and logical Briton born in 1815) developed a logic that, if it raised head, would be made an impression with the given use because it comprises of the modern digital logic. In order to create it, next to his rules, Boole he had in series to think about a system of switches and parallel because their laws are faithful to as a basic circuit behaves. We put an example: If we phelp attention to the circuit with two switches to and b we have when one of them

it is closed, it passes current and the light ignites, therefore we can say that S.A. 1, the light bulb is ignited. If in addition b also activates we can remove the rule that a (to 1) + b (to 1) = ignited

We relate this way the sum to the parallel circuit.

In this case we have created the logic gate Or If we have one series, the thing would be of the following form

In this case, when both they are only activated ignites the light (this is the basic door Y).

• Some of the important theorems but are:
•  Theorem 1: a+ a = a
•  a · a = a
•  to + 0 = a
•  b · 1 = b
•  a · 0 = 0
• to + 1 = 1
• We can add equal terms to a function and this one does not vary. This is f = f + f + f Example (a+b) = (a+b) + (a+b)   or ab = ab + ab + ab +.
• ab + to b' = a (where b' means complementary b). As we can remove common factor from a, the function is a (b + b) = to (1) = a
• Laws of Morgan:
• Laws of Morgan

Other exist that we will see on some exercises. The doors with their symbol imagine in the following figure

Door OR (or door Or in Spanish). It comes to say that the exit is high if an entrance is high Or the other entrance is high.

 The table of the truth is a b Exit 0 0 0 (dull light) 0 1 1 (ignited light) 1 0 1 1 1

1

The following one is the AND that means in Spanish and therefore it wants that to this to 1 and b to one. If it is not thus, dull light

 The table of the truth for door AND is: a b Exit 0 0 0 (dull light) 0 1 0 1 0 0 1 1

(ignited light)

 The NOT is the door to take the opposite. If you enter if, it leaves no. If you enter does not leave Yes. a Exit 0 1 1

0

We follow with the NAND (ONE and WITH an INVESTOR When coming out) AND WITH the NOR (a OR with an investor when coming out). The tables of the truth are equals only that, when having an investor when coming out, the S-value the opposite who the one of the origin door.

### Activity. To realise the tables of the truth of doors NAND and NOR

2 Representation of functions and circuits

A digital function represents a certain task, that is to say, says to us why values a function (exit) is to one. We put an example.

In this case we are saying that the function takes value 1 whenever to, b and c = 1   and in 2 case for a=1, b=0 and c=0. (when we have a gorrito upon the letter is interpreted as a 0). In this case we can make our circuit with logic gates that will be the following one:

We can simplify the circuit still more if we put the doors and without being investing, eliminating the investor. One has not become because we do not have in the program that door. You can do it He would have to be something as this circuit

He enters the Web

and he verifies as he works. You can change the pulser by a switch.

We suppose that we want to make a circuit that responds to a certain task, for example, a voting system so that one activates (green light) whenever

a) The head activates a pulser

b ) At least two employees of 3 activate the pulser

A priori it seems difficult. We are going to assign some letters to each character, for example to the Head the J and the employees a, b and c

 In this case we have it function (ignited green light) is to 1 if j = 1 or two of the letters is to 1. We go with the table of the truth: J a b c Exit 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 x x x

1

We put an x in the last row because to equal which is worth those values, if J is to 1 always ignites.

In order to obtain the function, we must fix us to the exit and to take all the values from entrance that cause that the exit is to 1. In this cases they are The circuit for this function is the following one:

But this circuit can be reduced if we looked at the rules of the Boolean algebra by who we have when there is a common variable is possible to be removed as factor, being the function as:

f = j to b c + to c + to b c + to b + j

If we observed the 3 first terms, we removed from conclusion that the light ignites when j is zero, c is one and for all the combinations of a and b except a'b', that is:

f = c (to b +   to + a   b) + j to b + j

Now we have a parenthesis with three possibilities of 4 for which that term is worth 1, which would be the same to say that: (to b +   to + to b) =   (to b) €˜

(with the quotation marks we indicated that it is complemented)

Therefore, which is in the parenthesis we can replace it by (to b) €˜

 Table of the truth a b (to b) €˜ to + b 0 0 0 0 0 1 1 1 1 0 1 1 1 1 1

1

We arrive at the function, adding the terms that lacked that:

f = c (to +   b) + to b + j The circuit stays to us as:

Exercise 2. To design a digital circuit for an alarm so that one activates whenever the pulser of front door or one of the windows is pressed either. If the general switch this deactivated does not have to work, that is

S.A. 1 or b activates = 1 and whenever the general switch east to 1 (c = 1).

To make the table of the truth and the circuit. Search other alternatives that the minimum of doors uses.

Exercise 3.  To realise a circuit with logic gates that a light bulb activates when one of the three pulsers is activated. The circuit that uses less doors better will be evaluated.

Exercise 4. Designing a circuit of 4 entrances so that it activates a water pump whenever, at least 3 of the entrances are active (1).

Exercise 5. We have doors NAND to make a circuit that activates with combinations 1101 and 0010. To realise the design of the circuit using the necessary doors.

Exercise 6. We want to make a safe with 7 entrances and one general.  The box has an electronic lock so that it is opened if the entrance in binary is 1110111 and furthermore we pressed the general pulser (g).  If g with an incorrect combination is pressed, a small explosive is detonated that makes unusable the lock.

Exercise 7.

An irrigation system acts so that the electro-valve activates when it receives a signal in emergency (entrance e) or some of the three humidity sensors activates. To make the canonical function, table of the truth, circuit and reduced circuit

Problem 8. In a field we have a deposit elevated with two sensors, one high (a), another one under (b). The deposit from which it takes water has another sensor C. To design a circuit that always maintains the full deposit. Problem 9. In the image a typical circumstance for the opening of some imagines barriers that allow the entrance and exit of cars in an underground garage (is visibility of no one to the other due to the existence of an incline.

In the system we have
C1 = Entered Key of car of the street
C2 = Key exit of car of the garage

S1 = Detector of car on the street
S2 = Detector of car in garage

We must control 5 exits
M = Motor of the door

R1 and V1 = Lights entered of the garage located in street (red and a another green one)

R2 and V2 = Lights exit of the garage (red and a another green one)

We go with the operation situations:

1. It is opened if
2. If car to the entrance is detected and the key is used to open the door. It must not have car in the garage to leave.
3. If there is car inside and it drives the key to open

Once quie the motor receives the opening order, is sent a signal to all the circuit during a period of time in which the state of any device does not change.

To use the suitable doors and to consider that the lights of the traffic lights must be agreed to each situation

Solutions:

Problem 4:

If we have 4 entrances and at least 3 must be active, we have activates for entrances 1111, 1110, 1101, 1011 and 0111, that in canonical form is:

f = abcd + abcd' + abc'd + ab'cd + a'bcd

We can simplify a pair of terms, since between 1 (1111) and the rest always there is a value that it changes. We take 1 and 2, that is abcd and abcd'. They have of common the ABC and therefore:

f= to b c + to b d + to b c d + to b c d

With this bond but another exposition can be done better. If we put the function again:

f = abcd + abcd + abcd + abcd + abcd. We are going to add but terms that are equal to first, so that we have left:

f = (abcd + abcd) + (abcd + abcd) + (abcd + abcd) + (abcd + abcd)

I have only added abcd to each one of the terms. The function does not vary.

Now in each parenthesis we have three equal variables and one that it changes. If we took the first parenthesis:

abcd + abcd   = ABC (d + d) = ABC (1) = ABC

For the rest of the groupings we have abd, acd and bcd. Therefore the function stays as

f = ABC + abd + acd + bcd.

Problem 8:

1. The lights of the traffic lights activate according to the circumstances. For the 4 lights we have:
2. The green light of above ignites only when it activates the sensor and key of above and the sensor of down is to zero. In addition it agrees down with the Red one of - > V1=R2=S1C1S2.

The red one of above agrees with the green one of down and they activate when the S2 and the C2 are active, therefore R1 = V2 = S2C2

The motor activates when some of the green lights is taking the step, therefore:

M = S2C2 + S1C1S2 Using the simulator of logic.ly/demo, to mount the resulting circuit and to verify that it works correctly.

## Important note: The correct thing for this problem is to use sequential circuits where the temporary sequences are considered (history of transitions). For this reason, it is considered that the combinacionales circuits are conditional to some temporalizadores (clock). For example, once active the motor, this one raise the door, remain a raised time and soon it lowers.

FAMILIES LOGICS

In order to make the doors there are two predominant technologies, TTL and the CMOS. First she uses bipolar transistors and second transistors CMOS.

Work of investigation