1/0 Program Input: One integer value for transitor type, and four flaoting-point values for the threshold voltge Vth, Vg which is voltage of terminal g, Vd which is voltage of terminal d, and Vs voltage of terminal s. Program Output: One line that shows the mode of operation of the transistor as OFF or Linear or Saturation if the input values are valid. Else it will show Invalid. Note that the output is case-sensitive.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
#include using namespace std; int main() { int type; double Vth, Vg, Vd, Vs; cin>>type>>Vth>>Vg>>Vd>>Vs; return 0; }
1/0
Program Input:
One integer value for transitor type, and
four flaoting-point values for the threshold
voltge Vth, Vg which is voltage of terminal g,
Vd which is voltage of terminal d, and Vs
voltage of terminal s.
Program Output:
One line that shows the mode of operation
of the transistor as OFF or Linear or
Saturation if the input values are valid. Else
it will show Invalid. Note that the output is
case-sensitive.
Sample Test Case 0
Input:
0 0.3 1 10
Output:
Saturation
Sample Test Case 1
Input:
0 0.3 -1 10
Output:
Invalid
Sample Test Case 2
Input:
1 -0.3 0 0.9 1
Output:
Linear
Transcribed Image Text:1/0 Program Input: One integer value for transitor type, and four flaoting-point values for the threshold voltge Vth, Vg which is voltage of terminal g, Vd which is voltage of terminal d, and Vs voltage of terminal s. Program Output: One line that shows the mode of operation of the transistor as OFF or Linear or Saturation if the input values are valid. Else it will show Invalid. Note that the output is case-sensitive. Sample Test Case 0 Input: 0 0.3 1 10 Output: Saturation Sample Test Case 1 Input: 0 0.3 -1 10 Output: Invalid Sample Test Case 2 Input: 1 -0.3 0 0.9 1 Output: Linear
Transistors are one of the basic circuit elements
used in designing digital and analog circuits.
CMOS transitors are the most recent type of
transitors used for such purposes. Each transitor
consists of three terminals (Gate and we will
refer to it as g, Drain and we will refer to it as d,
and the Source and we will refer to it as s)
In digital circuit design we will look at the
transitor as a switch. When it is closed, it will
conduct the current; and when it is open, it will
act as an open circuit and it will not conduct the
current.
To simplify the idea you can think of it as a bridge
that helps the person cross the river. When the
bridge does not exist then you cannot pass to the
other side of the river (similar to the open or OFF
transistor). When it exists then you can use it to
cross the river (similar to the closed/ON
transitor).
The voltage differnece between the three
terminals of the transistor decides if the
transistor is OFF or ON and if it is ON then in
which mode: Linear or Saturation.
The following equations describe the details of
the modes of operation for the two types of the
CMOS (NMOS and PMOS) transistor and the
conditions for each mode.
, Vgs < Vih
, Vgs 2 Vih and Vás < (Vgs – Vih)
OFF
mode(NMOS) =
ON, in Linear Mode
ON, in Saturation Mode , Vgs > Vih and Vás 2 (Vgs – Vih)
,Vgs 2 Vih
, Vgs < Vih and Vas 2 (Vys – Vih)
,Vgs < Vih and Vas < (Vgs – Vih)
OFF
mode(PMOS) = { ON, in Linear Mode
ON, in Saturation Mode
Important Notes:
• Please note that Vas = Va – V, 'and so on.
• If the transitor type is NMOS then the type is
O and if the transitor type is PMOS then the
type is 1
• All terminal voltages Vd, Vg and Vs should
be greater than or equal 0. So, if the value
for any terminal is less than 0 then the
program should print Invalid
• Do not add any cout statements except for
the final answers as shown in the sample
cases. Also note that the grader is case-
sensitive; so "invalid" is wrong but "Invalid"
is correct. Do not add any unnecessary
spaces.
Transcribed Image Text:Transistors are one of the basic circuit elements used in designing digital and analog circuits. CMOS transitors are the most recent type of transitors used for such purposes. Each transitor consists of three terminals (Gate and we will refer to it as g, Drain and we will refer to it as d, and the Source and we will refer to it as s) In digital circuit design we will look at the transitor as a switch. When it is closed, it will conduct the current; and when it is open, it will act as an open circuit and it will not conduct the current. To simplify the idea you can think of it as a bridge that helps the person cross the river. When the bridge does not exist then you cannot pass to the other side of the river (similar to the open or OFF transistor). When it exists then you can use it to cross the river (similar to the closed/ON transitor). The voltage differnece between the three terminals of the transistor decides if the transistor is OFF or ON and if it is ON then in which mode: Linear or Saturation. The following equations describe the details of the modes of operation for the two types of the CMOS (NMOS and PMOS) transistor and the conditions for each mode. , Vgs < Vih , Vgs 2 Vih and Vás < (Vgs – Vih) OFF mode(NMOS) = ON, in Linear Mode ON, in Saturation Mode , Vgs > Vih and Vás 2 (Vgs – Vih) ,Vgs 2 Vih , Vgs < Vih and Vas 2 (Vys – Vih) ,Vgs < Vih and Vas < (Vgs – Vih) OFF mode(PMOS) = { ON, in Linear Mode ON, in Saturation Mode Important Notes: • Please note that Vas = Va – V, 'and so on. • If the transitor type is NMOS then the type is O and if the transitor type is PMOS then the type is 1 • All terminal voltages Vd, Vg and Vs should be greater than or equal 0. So, if the value for any terminal is less than 0 then the program should print Invalid • Do not add any cout statements except for the final answers as shown in the sample cases. Also note that the grader is case- sensitive; so "invalid" is wrong but "Invalid" is correct. Do not add any unnecessary spaces.
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education