Electronics Midterm
The following C++ code will generate what: for(i=0; i<=17; i++){ printf("%2d \n", i); }
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
What is the voltage at R1?
0.225 volts
The octal number 153 would be written in binary as:
001 101 011.
The decimal number 213 would be written in BCD as:
0010 0001 0011.
The hexadecimal number 2D9 would be written in binary as:
0010 1101 1001.
The following C++ code will generate what: for(i=1; i<=17; i++){ printf("%2d \n", i); }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
The following C++ code will generate what: for(i=1; i<=17; i=i+2){ printf("%2d \n", i); }
1 3 5 7 9 11 13 15 17
The memory size represented is:
1 K
The hexadecimal number C4 would be written in decimal as:
196
Assume you have a voltage divider circuits. If the source voltage is 5 volts and both resistors are the same value what is the voltage across both output resistors?
2.5
Most LED diodes are designed run with ________.
20 mA
If a given memory unit consists of 1250 16-bit words, the memory capacity would be rated:
20,000 bits
What is the power consumed by all the resistors? 12V, R1-1, R2-3, R3- 4, R4-2, R5-2
24W
What is the value of I-Total?
3 Amps
Match resistor color code to the resistor value. orange-orange-orange-gold brown-black-red-gold brown-black-yellow-gold
33 k ohm 1 k ohm 100 k ohm
What value of resistance R if the voltage across the 2 ohm resistor is 4 volts?
4 ohm
The binary number 101101 would be written in decimal as:
45
The binary number 101 has the decimal equivalent of:
5
The following C++ code will generate what: for(i=5; i>=2; i--){ printf("%2d \n", i); }
5 4 3 2
The following C++ code will generate what: for(i=5; i>0; i--){ printf("%2d \n", i); }
5 4 3 2 1
The octal number 62 would be written in decimal as:
50
What is the power absorbed by R2?
6 watts
For a base 8 number system, the weight value associated with the third digit would be:
64
Which of the following will not come on?
A and D
A finite state machine (FSM) has:
A fixed number of defined states.
A finite state machine (FSM) must have
A fixed number of states, with well defined transitions
Which diode will draw the most current?
B 10K
Which circuit reads "false" if the button is pushed, and "false" if the button is not pushed,?
B PB and 10K connected to Ground
Which of the following is Active Low.
B +5V connected to 1K connected to D5
Which circuit generates a "false" when the pushbutton is pressed.
C +5V connected to 10K
Which circuit would you use with the internal pullup?
D +5V Connected to PB
Which circuit generates a "true" when the pushbutton is pressed.
D +5V connected to PB
Which of the following is on if power is on.
E +5V connected to 1k
Binary number systems use positive and negative symbols to represent the polarity of a number.
False
One side of a diode must be connected to ground for the diode to light
False
The decimal system uses the number 9 as its base.
False
To express a number in binary requires fewer digits than in the decimal system.
False
Which of the following are true about the L293 dual H-bridge:
It has four channels. It supports four motors. It has two enable inputs. It has two power inputs
Which of the following are true about the L293 dual H-bridge:
It is designed for two motors There is one enable for each motor The enable must be high for the motor to run
Rtotal is ________ than R1, R2, R3, or R4 individually.
Less
One byte of the data shown is represented by:
No. 1
The MSB of the data shown in Figure 3-1 is represented by:
No. 2
If R1=1 kohm, R2=3 kohm, R3=6k ohm and R4=3 kohm what is the voltage across R3 if the voltage source is 5 volts?
None of the above
Assume you have connected an L293NE H-bridge as shown. (0 is GND, 1 is 5 volts) What is the state of motor 2?
Not enabled. The motor is turned off.
The following C++ code will generate what: for(i=5; i<0; i-=1){ printf("%2d \n", i); }
Nothing
Using the analogWrite function we can get analog results with digital means. What is the acronym for this technique?
PWM
Components in a _______ circuit share the same voltage.
Parallel
in the statement: LiquidCrystal lcd(12, 11, 5, 4, 3, 2); The numbers: 12, 11, 5, 4, 3, 2
Represent the Arduino digital pins connected to the LCD display.
Components in a _______ circuit share the same current.
Series
In a _________ circuit, all components are connected end-to-end, forming a single path for electrons to flow.
Series
Which is not one of the three leads of a bipolar transistor?
Source
Which of the following is true for the circuit below.
The diode will not come on because it is reverse biased.
A push button or a slide switch is connected to a digital IO pin without an internal or external resistor. What happens?
The wire acts like an antenna.
The PWM stands for Pulse Width Modulation.
True
The analogWrite method writes an analog value (PWM wave) to a Arduino analog pin.
True
The base of a number system determines the total number of unique symbols used by that system.
True
The command: Serial.println("Hello"); prints Hello on a new line.
True
The hexadecimal number system consists of 16 digits including the numbers 0 through 9 and letters A through F.
True
The octal number system consists of digits 0, 1, 2, 3, 4, 5, 6, and 7. There are no 8's or 9's.
True
The radix of a number system is the same as the base.
True
Usually a group of 8 bits is a byte, and a group of one or more bytes is a word.
True
Assume you have connected an L293NE H-bridge as shown. (0 is GND, 1 is 5 volts) What is the state of motor 1?
Turn left
To use PWM with L293 H Bridge:
Use PWM on the enable
Current =
Voltage/Resistance
Match the quantity with its measure. Voltage Current Resistance
Volts Amps Ohms
In the figure below the white wirer connected to Pin A0 is called the ______________.
Wiper
A finite state machine (FSM) is:
a good way to implement sequence logic
A finite state machine (FSM) is controlled with ?
a state variable
Given the following code, what will happen? a=130; c=200; if (a>100) b=a; else b=c;
b to 130
Given the following code, what will happen? a=130; c=200; if (a) b=a; else b=c;
b to 130
Given the following code, what will happen? a=130; c=200; if (a==130) b=a; else b=c;
b to 130
When the code below runs the result will be: a=10; b=0; switch (a){ case 10: b=1; break; case 20: b=2; break; default: b=3; }
b=1
When the code below runs the result will be: a=20; b=0; switch (a){ case 10: b=1; break; case 20: b=2; break; default: b=3; }
b=2
The number 127 could not be:
binary
This function take in a value and sets the minimum and maximum values.
constrain
All digital computing devices operate using the binary number system because:
digital circuits can be easily distinguished between two voltage levels.
Which Arduino command is used to read an input pin and determine it is a logical 0 or 1?
digitalRead
Which command is used set an output of the Arduino to a logical 0 or 1?
digitalWrite
For the circuit in A, given: inputMode(4, INPUT); fPb=digitalRead(4); What will the value of fPb be?
false when the button is pressed and a random value when the button is not pressed. Always false Always true
The ASCII code:
includes letters as well as numbers.
According to Ohms law when the voltage increases and the resistance remain the same what happens to the current?
increases
Which code below will configure digital pin 8 as OUTPUT?
int pin = 8; pinMode(pin, OUTPUT);
Assume you setup an liquidCrystal display as follows: #include <LiquidCrystal.h> LiquidCrystal lcd(10); void setup() { lcd.begin(16,2); } What is the command to set the cursor to row 2 column 7?
lcd.setCursor(1, 7);
Use the ____ function to scale values to the range you want.
map
In the sign bit position, a 1 indicates a(n):
negative number.
Print the values of A B C to the serial monitor.
none of the above
The main advantage of using the Gray code is:
only one digit changes as the number increases
A(n) ___________ bit is used to detect errors that may occur while a word is moved.
parity
Which command is used to program the Arduino's input output ports?
pinMode
Voltage is the measure of
potential energy
In this type of circuit the voltage drops add to equal total voltage.
series
Given the following code, what will happen? a=130; c=200; if (a<100) b=a; else b=c;
sets a to 130 c to 200 sets b to c based on the value of c
The result of an imbalance of electrons between objects is called _________ electricity.
static
Kirchhoff's Voltage Law (KVL) tells us that the algebraic sum of
the voltages in a loop must equal zero.
Why would you place a resistor in series with an LED?
to limit the current through the LED
The basic Arduino program requires two parts or functions. What are these two
void setup() {} void loop() {}
Components such as resistors in a parallel circuit share the same __________.
voltage
The code below will cause what to happen? if (stopTimer) { //stopTimer = false; Serial.println("Timer Stop"); state = 20; }
will do A and B but only if stopTimer is true
What is the total current provided by the 6 volt source?
1.65 mA
What is the voltage across R1?
1.65 volts
The decimal system has as its base:
10
The Uno Arduino board contains a 6 channel, 10-bit analog to digital converter. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and ___________.
1023
The decimal number 28 would be written in binary as:
11100.
The decimal number 15 would be written in binary as:
1111
The number 12 is:
12 in decimal
If a LED diode in series with a resistor which is connected between 0 and 5 volts. What value of resistance is required to limit the current in the LED to 20 mA if there is a 2 volt drop across LED?
150 ohms
In this circuit, three resistors receive the same amount of current (4 amps) from a single source. Calculate the amount of voltage "dropped" by each resistor.
E1 = 4 volts, E2 = 8 volts, E3 = 12 volts
To avoid confusion always use the following statement to read an digital input when using the internal pull up:
FPb=!digtalRead(4);
Which of the following number systems has a base of 16?
Hexadecimal
Why would you use an active low output?
To increase the output power.
Why would you use the internal pullup.
To save money
A LED diode has polarity. Polarity means there is a + (plus) and - (negative) lead on the device.
True
A circuit is an unbroken loop of conductive material that allows electrons to flow through continuously without beginning or end.
True
A diode is an electrical component acting as a one-way valve for current.
True
A photoresistor is a resistor whose resistance decreases with increasing incident light intensity.
True
A pull down resistor is connected to the lead of a push button to ensure its voltage is zero if the push button is not pressed.
True
All digital computing devices perform operations in binary.
True
In a voltage divider circuit a the voltage across a resistor must always be lower than the source voltage.
True
In any number system, the position of a digit that represents part of the number has a weighted value associated with it.
True