You are on page 1of 6

Exam Expectations: Grade 11 Computer Engineering Technology (TEJ3M1)

Bring a pencils, erasers and scientific calculators. Cellphone is not allowed.


The exam is comprised of 85 marks with parts as listed below.
Be sure to review ALL unit tests, assignments, activities and projects you did for this course.
Review course notes and PPT lessons for every unit posted in the class moodle.

Part A Multiple Choice


For questions in this section you should be able to:
- Convert numbers from binary to decimal, binary to hexadecimal, decimal to binary, decimal to
hexadecimal, hexadecimal to binary and hexadecimal to decimal.
- Draw the symbols, give the truth tables and boolean equations for the following basic logic gates: AND,
OR, XOR, NOT, NAND, NOR and XNOR.
- Complete the truth table for a given circuit diagram made up of the logic gates listed above.
- Write the Boolean equation for a given circuit diagram. Given a Boolean equation, draw the corresponding
logic gate circuit diagram.
- Understand networking fundamentals, networking topologies, LAN and WAN technologies.
- Understand OSI layers, protocols and devices and IP addressing and subnetting.
- Describe the purpose, function and specifications of the Basic Stamp II module, its components and pins
as covered in our class notes and exercises. This includes, for example, memory capabilities, voltage
specifications, current limits (i.e. sink/source limits) for I/O pins, etc.
- State the range of decimal numbers that can be stored in WORD, BYTE, NIB, or BIT variables and the bit
size of these variables.
- Analyze Basic Stamp breadboard and schematic diagrams, for circuits containing piezo speaker, LEDs,
wires, resistors, capacitors, photoresistors, whiskers, IR LED and IR detectors.
- Understand, use and display the output of the following PBASIC statements:
- VAR
- HIGH, LOW
- DEBUG,

- PIN
- PAUSE

- Decisions (IF, ELSE, ELSIF etc.)


- Repetitions (i.e. DO UNTIL LOOPs, FOR - NEXT LOOPs, WHILE LOOPs)
- Understand Boe-Bot components such as servos; describe how the PULSOUT PBASIC statement can be
used to send pulses in order to drive Boe-Bot wheels.
- Understand the purpose of and method to create a brownout detector, with a piezo-speaker and the
PBASIC FREQOUT statement.
- Understand how the infrared detection system works with PBASIC code and IR LEDs and IR sensors.
Explain how to increase or decrease the sensitivity of the IR system using both hardware and software.

Part B : Digital Logic Gates, Combinational Circuits, Boolean Equations and Circuit
Diagrams
1. Write the Boolean equation for each of the following circuit diagrams. Do not simplify.

2. Draw
Do not simplify.

the circuit diagram for each of the following Boolean equations.

a)

b)

Part C: Series and Parallel Circuits


- Apply the relationship between Current, Resistance and Voltage. (V=IR)
Use Ohms law,
Kirchhoffs current and
Kirchhoffs voltage law
Calculate the total resistance, current, voltage and power on a series-parallel circuits.

Part D: PBASIC Programming


- Write a PBASIC program, including comments, to implement a system described in a problem statement
that requires the use of subroutines.
- Understand and/or use the PBASIC commands: PULSOUT, PAUSE, FREQOUT, GOSUB, RETURN.
- Write PULSOUT statements for both the left and right servos to make the robot go forward, backward, turn
(i.e. rotate) left, turn (i.e. rotate) right, pivot forward left, pivot forward right and stop.
- Write PBASIC code, including FOR LOOP statements, which move a given robot a particular distance
and turn a given robot a particular angle:
- Write PBASIC FOR LOOP statements to move the same robot a specific distance
- Write PBASIC FOR LOOP statements to turn the same robot a specific angle
- Write PBASIC statements to navigate the same robot along the perimeter of a given shape.

Additional Review Notes


1. Basic Boe-Bot/Servo Movements to Remember/Understand
650 is clockwise (full speed)
750 is stop/still
Assume: Left wheel is 13, Right wheel is 12

850 is counter-clockwise (full speed)

Move Forward at top speed:


PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
Move Backwards at top speed:
PULSOUT 13, 650
PULSOUT 12, 850
PAUSE 20
Rotate Right (left wheel moves forward while right wheel moves backward):
PULSOUT 13, 850
PULSOUT 12, 850
PAUSE 20
Rotate Left (right wheel moves forward while left wheel moves backward):
PULSOUT 13, 650
PULSOUT 12, 650
PAUSE 20
Pivot Right Forward (left wheel moves forward while right wheel is stopped):
PULSOUT 13, 850
PULSOUT 12, 750
PAUSE 20
3

2) Calculating Boe-Bot Distances and Speed


Assume that the following code moves a robot at top speed forward for a distance of 23 cm in 1 second:
FOR counter = 1 TO 41
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
NEXT
a) Find the number of loops required to move the given robot forward at top speed for 51 cm as follows.
Let x be the number of loops required to drive the servos 51 cm. Solve for x in the following equation:
x = _________________
41loops
x

23cm
51cm
b) Complete the code to move the given robot forward at top speed for 51 cm.
FOR counter = 1 TO _______
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
NEXT
3) Calculating Boe-Bot Turns
a) Assume that the following statements turn the given robot 120 right:
FOR counter = 1 TO 24
PULSOUT 13, 850
PULSOUT 12, 850
PAUSE 20
NEXT
Find the number of loops required to turn the given robot about 140 right. Let x be the number of
loops required to turn the robot right about 140. Solve for x in the following equation:

b) Complete the code to turn the given robot right 140.


FOR counter = 1 TO _______
PULSOUT 13, 850
PULSOUT 12, 850
PAUSE 20
NEXT

PBASIC Variables and Arithmetic


Given the following variable declarations:
NUMA VAR Word
NUMB VAR Byte
NUMC VAR Nib
NUMD VAR Bit
Predict the output of the following sections of code without using the computer
Output
NUMA = 62111
NUMB = 532
NUMC = 15
NUMD = 5
DEBUG ? NUMA

_____________________________

DEBUG ? NUMB

_____________________________

DEBUG ? NUMC

_____________________________

DEBUG ? NUMD

_____________________________

DEBUG SDEC ? NUMA

_____________________________

NUMA = $412C
NUMB = %11010110
NUMC = 29
DEBUG BIN ? NUMA

_____________________________

DEBUG HEX ? NUMB

_____________________________

DEBUG BIN ? NUMC

_____________________________

DEBUG HEX ? NUMC

_____________________________

DEBUG BIN8 ? NUMA.LOWBYTE

_____________________________

DEBUG BIN4 ? NUMB.HIGHNIB

_____________________________

DEBUG BIN ? NUMA.LOWNIB.BIT2

_____________________________

NUMB = -7
DEBUG ? NUMB

_____________________________

NUMA = 4 + 3 * 2 + 8 / 2

_____________________________

DEBUG ? NUMA

_____________________________

NUMA = (5 + 15) - (10 / 2)


DEBUG ? NUMA

_____________________________

NUMA = 51 / 9
DEBUG ? NUMA

_____________________________

NUMA = 42 // 5
DEBUG ? NUMA

_____________________________

Navigating Shapes with Robots


Review the program code below which drives a given robot to trace a one metre square.
Notice subroutines, RightTurn and Forward. Take note of the number of pulses to make the robot turn right
and move forward. Do the calculation.
' Sample program to trace a one metre square with a robot
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Pins and Variables ]---------------------------------Speaker PIN 4
RightMotor PIN 12
LeftMotor PIN 13
pulseCount VAR Word
noOfPulses VAR Word
sideCount VAR Nib
' -----[ Main Routine ]------------------------------FREQOUT Speaker, 2000, 3000 'Sound the buzzer when program starts or restarts
' Traces out a 1m by 1m square (1 m = 100 cm)
FOR sideCount = 1 TO 4
noOfPulses = 184
GOSUB Forward
noOfPulses = 24
GOSUB RightTurn
NEXT
END
' -----[ Subroutine - RightTurn ]--------------------' Turns the robot to the right (Rotates clockwise) for noOfPulses
RightTurn:
FOR pulseCount = 1 TO noOfPulses
PULSOUT LeftMotor, 850
PULSOUT RightMotor, 850
PAUSE 20
NEXT
RETURN
' -----[ Subroutine - Forward ]-----------------------' Move the robot forward for noOfPulses
Forward:
FOR pulseCount = 1 TO noOfPulses
PULSOUT LeftMotor, 850
PULSOUT RightMotor, 650
PAUSE 20
NEXT
RETURN

You might also like