1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
pantera1 [17]
3 years ago
13

(10 points) A stopwatch has three states named Zero, Running, and Stopped. There are two buttons, named B1 and B2. For each butt

on, pressing the button produces a 1 and not pressing the button produces a 0. B1 works as follows: If the stopwatch is in the Zero state, pressing B1 causes it to advance to the Running state. If the stopwatch is in the Running state, pressing B1 causes it to advance to the Stopped state. If the stopwatch is in the Stopped state, pressing B1 causes it to return to the Running state. Pressing B2 has no effect unless the stopwatch is in the Stopped state, in which case pressing B2 (even if B1 is pressed) causes the stopwatch to go to the Zero state. Design a finite state machine controller for this stopwatch that has two inputs (B1 and B2) and three outputs, one for each of the three states. The state of the controller uses two J-K flip-flops.

Computers and Technology
1 answer:
solniwko [45]3 years ago
6 0

Answer:

see explaination

Explanation:

State Diagram based on given in the problem and state table, k-map for j and k, based j and k expressions we can draw the (FSM )controller using j and j flip flop.

see attachment for this.

You might be interested in
The function ________ comprises one or more statements that are executed when the function is called.
spin [16.1K]

Answer:

Option B(Body) is the correct answer for the above question.

Explanation:

The function is a defined processor of some specific task, which is used to perform some action of the task. The function is of two types one is predefined, which is defined by the compiler and, the other is user-defined, which is defined by the programmer. Any user-defined function has three parts--

  • Function prototype: It states the type of function.
  • Function body: It holds the collection of instruction that needs to perform by the function.
  • Function call: From where the function is called.

The above question asked about the term, which holds the statement of the function and that term is function Body, which is defined above. So the answer body, which is stated from the option 'B'. Hence 'B', is the correct option while the other is not because--

  • Option 'A' states about the header, which is not the part of the function
  • Option 'C' states about data type, which defines the types of data.
  • Option 'D' states none of these, but the answer is option B.
  • Option 'E' states about the definition, which is not the correct answer.
5 0
3 years ago
Write a program in C which will open a text file named Story.txt. You can create the file using any text editor like notepad etc
ddd [48]

Answer:

See explaination

Explanation:

#include <stdio.h>

#include <stdlib.h>

int main()

{

FILE * file_object;

char file_name[100];

char ch;

int characters=0, words=0;

printf("Enter source file name: ");

scanf("%s", file_name); //asking user to enter the file name

file_object = fopen(file_name, "r"); //open file in read mode

if (file_object == NULL)

{

printf("\nUnable to open file.file not exist\n"); //check if the file is present or not

}

while ((ch = fgetc(file_object)) != EOF) //read each character till the end of the file

{

if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\0') //if character is space or tab or new line or null character increment word count

words++;

else

characters++; //else increment character count this assures that there is no spaces count

}

printf("The file story.txt has the following Statistics:\n"); //finally print the final statistics

if (characters > 0)

{

printf("Words: %d\n", words+1); //for last word purpose just increment the count of words

printf("Characters (no spaces): %d\n", characters);

}

fclose(file_object); //close the file object

return 0;

}

6 0
4 years ago
How to learning algothrim bett
Stells [14]
The GCSE Computing MOOC (created with Cambridge University Press and Raspberry Pi) can be used either as a course or a flexible teaching resource,
8 0
4 years ago
3. Which swim_backwards method is called when sammy.swim_backwards() is executed? Why?
Georgia [21]
Classes called child classes or subclasses inherit methods and variables
4 0
3 years ago
O microfone do meu fone chia quando eu não fico tocando no meu pc com as mão
4vir4ik [10]

mano muito top,topzera

5 0
3 years ago
Other questions:
  • They predicted another cold day in Seattle. They predicted another windy day in Seattle. Combine the sentences into one sentence
    8·1 answer
  • Zack wants to be a landscape designer.which qualification would be best prepare him for work in this career
    12·2 answers
  • How many of devices you identified inside the control room need to magnetism to operate
    9·2 answers
  • Which of the following is true regarding a class and interface types? Group of answer choices You can convert from a class type
    9·1 answer
  • The GeForce GTX 1060 graphics card requires 120 W of power. You plan to install it in a PCIe 3.0 ×16 slot. Will you need to also
    13·1 answer
  • Important tools used in the _____ phase of the DMAIC process include a project charter, a description of customer requirements,
    10·1 answer
  • Create a Person Class that:
    14·1 answer
  • How was the addition of an improvement over early web design?
    11·1 answer
  • Select the correct answer
    15·1 answer
  • When you use transact-sql, you can store procedural code in:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!