🔬 Lab
CS 240 Lab 2
Learning Goals & Reflection
CS 240 Lab 2
Learning Goals
Core Goals
Students can:
- Deal with singed and unsigned binary and hexadecimal numbers:
(
)
- Explain the difference between signed an unsigned binary numbers.
- Explain how the two’s-complement system represents both positive and negative numbers using binary.
- Identify which positive numbers in an unsigned interpretation are equivalent to which negative numbers in a two’s-complement interpretation.
- Explain the difference between overflow and carry-out in binary addition.
- Perform binary addition for fixed-width signed and unsigned binary operands, identifying overflow and/or carry-out conditions.
- Perform addition for fixed-width hexadecimal numbers, identifying overflow and/or carry-out conditions.
- Convert numbers between binary, hexadecimal, and decimal, including two’s-complement binary for negative numbers.
- Explain why computers use fixed-width binary to represent numbers.
- Explain why hexadecimal is used by low-level programmers.
- Build physical circuits that use binary representations, based on
logic diagrams:
(
)
- Explain the difference between a pinout and a logic diagram.
- Given a logic diagram, connect wires to one or more chips on a workbench to build the circuit it represents.
- Record a circuit’s behavior across multiple input events to create a table of its outputs over time.
- Explain how groups of high- and low-voltage wires in a circuit can represent a number.
- Read the number represented by a group of LEDs that are turned on or off by a connected circuit.
- Recognize the pattern of bits formed when counting up in binary.
- Connect multiple chips together to form a more complicated circuit.
- Use LogicWorks and/or the Falstad online simulator to build and
debug simulated circuits:
(
)
- Use the filter in the component pane of LogicWorks to find components for voltage sources, ground connections, basic gates, logic switches and logic indicators, and clocks.
- Use the ‘Draw’ menu in the Falstad simulator to create voltage sources, ground connections, basic gates, logic switches (inputs), and logic indicators (outputs) and clocks.
- Use the basic wire tool in LogicWorks to draw wires and connect components.
- Draw wires to connect components in the Falstad simulator using the wire tool.
- Use the lightning tool and/or the delete key in LogicWorks to delete wires/components.
- Use the delete key to delete components in the Falstad simulator.
- Add labels and open the timing pane in LogicWorks to view timing diagrams.
- Add labeled nodes and create and stack scopes nodes in the Falstad simulator to view timing diagrams.
- Turn on voltage indicators in LogicWorks and debug circuits to ensure they are connected properly.
- Read voltage colors in the Falstad simulator and debug circuits to ensure they are connected properly.
- Work with timing diagrams for sequential circuits:
(
)
- Explain the difference between combinational and sequential circuits.
- Identify the voltage for each listed input/output of a circuit at a particular time in a timing diagram.
- Draw the timing diagram for a clock component’s output.
- Draw the timing diagram for a circuit composed of clocks and basic gates.
- Design circuits that compute single-bit functions:
(
)
- Convert between truth tables, Boolean algebra expressions, and circuit diagrams.
- Use XOR gates to create a circuit that outputs the parity bit for a 4-bit input.
- Build simulated circuits in LogicWorks or the Falstad simulator based on a circuit diagram, and test that they implement a particular truth table.
- Work with bitwise & boolean operators in C:
(
)
- Identify the argument types, argument names, function name, and return type of a C function.
- Using limited constants and operations, and without using any control constructs, macros or helper functions, write C functions to implement simple operations on 32-bit integers.
- Calculate results of the C bitwise operators
!
,~
,&
,^
,<<
and>>
as well as normal addition (+
) on paper for 8-bit signed and unsigned integers, in binary.
Stretch goals
- Work with timing diagrams for sequential circuits
(
)
- Explain what happens if you connect a NOT gate’s output to its input to form a loop.
- Identify AND, OR, and NOT relationships among inputs/outputs in a timing diagram.
- Work with bitwise & boolean operators in C:
(
)
- Calculate results of the C bitwise operators on paper in hexadecimal and/or decimal, for 32-bit signed and unsigned integers.
- Explore different operator combinations to design solutions for complex bitwise operations by combining simpler operations, including with a limited set of operators.
- Explain multiple strategies for designing such functions.
Reflection
Note: Make sure to use the ‘print’ dialog to save this page as a PDF when you’re done.
I’m most confident in (list a few):
I’m least confident in (list a few):
Questions: