Derive a) excitation equations, b) next state equations, c) a state/output table, and d) a state diagram for the following circuits Example 5.1: A railway station has four platforms marked as P1, P2, P3 and P4 as shown in the figure 5.2. The trains can come only from left hand side and enter these platforms. The trains are to be routed to these platforms in the order of preference P1, P2, P3 and in the last to P4. Each platform has a switch will be turned ON if the platform is not empty. There is an outer signal S which will be either green or red. This signal will be green if it allows the train to enter the station otherwise red. There are three track changer switches T1, T2, T3 which allows changing the tracks. Design a railway track switching circuit using AND, OR and NOT gates, which can perform the operations mentioned above. Page 124 Fig. 5.2 Solution: From the word statement of the problem it is clear that P1, P2, P3 and P4 are the four input variables, outer signal S and track changers T1, T2 and T3 are the four output variables. The input as well as output variables are two valued functions, since the platforms are either empty or occupies, track changers are either to be changed or not to be changed, similarly the outer signal S has two options that it is either green or red. The switching system having input and output variables is shown in figure 5.3. Now the logic values are assigned to the input and output variables. Logic 0’s are assigned to the platforms P1, P2, P3 & P4 if these are empty otherwise logic 1. The track changer T1 is not to be changed if the train is allowed to enter P1 otherwise it is to be changed. So logic 1 is assigned to T1 if track is not to be changed and logic o if the track is to be changed. Similarly logic values are assigned to the other track changers. The Signal S is assigned logic 1 to the green signal and logic 0 to the red signal. The truth table will be drawn for all the input and output variables as given in table 5.1. Also the K-maps for the output variables are drawn as shown in figure 5.4. Table 5.1 Design the combinational logic circuit using NAND gates only for the following word statement. The insurance policy will be issued to the applicant, if he is: (i) a married female of 22 years or more, or (ii) a female under 22 years, or (iii) a married male under 22 years and who has not been involved in a car accident, or (iv) a married male who has been involved in a car accident, or (v) a married male of 22 years old or above and who has not been involved in a car accident. Design the circuit which can issue the insurance policy to the applicant. Solution: From the word statement of the problem that it has four input variables and one output variables. The input variables are (i) The applicant is married or not –we assign the symbol X for it. Logic 1 is assigned to X if the applicant is married otherwise assign logic 0. (ii) The applicant is male or not – assign the symbol Y for it. Logic 1 is assigned to Y if the applicant is male and logic 0 to female. (iii) The applicant is 22 years old or more – assign the symbol Z for it. Logic 1 is assigned if the applicant is below 22 years and logic 0 is assigned if the applicant is 22 years old or more. (iv) The applicant is involved in a car accident- assign the symbol W for it. Logic 1 is assigned to W if the applicant has involved in a car accident otherwise W is assigned logic 0. Output is the policy issued to the applicant. Let P is the symbol for the policy. Logic 1 is assigned to P if the poly is issued to the applicant otherwise P is assigned logic 0. The switching system having input and output variables is shown in figure 5.6. Table 5.2 shows the truth table for all the conditions discussed above. The K-map for the output variable P is shown in figure 5.7. The Boolean expression for the output variable P is given as: ZYXP From this expression it is clear that the policy will be issued to the applicant who is married or a female under 22 years. The circuit will be realized using NAND gates as shown in figure 5.8. Fig. 5.8 Example 5.3: The entrance to a group of four flats has a tube light. The tube light is to be switched ON and OFF independently by the tenants of the four flats using switches located in their flats. Design a switching circuit to implement this using: