Back to marketplace

Chapter 4 (Section 3) Final Revision #1

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

Key Terms and Definitions

Back (Answer)

#2
Front (Question)

What is a “shift” in binary terms?

Back (Answer)

Moving the bits stored in a register a given number of places within the register.

#3
Front (Question)

What is a “mask” in bit manipulation?

Back (Answer)

A number used with logical operators (AND, OR, XOR) to identify, remove, or set a single bit or a group of bits in an address or register.

#4
Front (Question)

What is the difference between monitoring and control (in terms of using sensor data)?

Back (Answer)

Monitoring: automatically takes readings from a device. Control: takes readings AND uses that data to adjust the device.

#5
Front (Question)

Types of Binary Shifts

Back (Answer)

#6
Front (Question)

What is a logical shift?

Back (Answer)

A shift in which bits shifted out of the register are simply discarded, and zeros are introduced at the opposite end.

#7
Front (Question)

What is the defining characteristic of an arithmetic shift?

Back (Answer)

The sign of the number is preserved (the leftmost / sign bit is treated specially so the value retains its sign).

#8
Front (Question)

What happens during a left arithmetic shift?

Back (Answer)

• The leftmost bit is shifted out, and a 0 is introduced at the rightmost end. • This multiplies the binary number by 2 for each shift (or overflow occurs).

#9
Front (Question)

What happens during a right arithmetic shift?

Back (Answer)

• The rightmost bit is shifted out, and the leftmost (sign) bit is preserved/duplicated to maintain the sign of the number. • This divides the binary number by 2 for each shift, keeping the sign intact (underflow may occur).

#10
Front (Question)

What is a cyclic shift, and how does it differ from logical/arithmetic shifts?

Back (Answer)

A cyclic shift loses no bits — bits shifted out of one end of the register are introduced at the opposite end.

#11
Front (Question)

Mathematical Effects of Shifts

Back (Answer)

#12
Front (Question)

What is the mathematical effect of a left shift?

Back (Answer)

It effectively multiplies the binary number by 2 for each place shifted (unless overflow occurs).

#13
Front (Question)

What is the mathematical effect of a right shift?

Back (Answer)

It effectively divides the binary number by 2 for each place shifted (underflow may occur).

#14
Front (Question)

Assembly Shift Instructions

Back (Answer)

#15
Front (Question)

What does the instruction “LSL n” do?

Back (Answer)

Logically shifts the bits in the Accumulator (ACC) n places to the left, introducing zeros at the right.

#16
Front (Question)

What does the instruction “LSR n” do?

Back (Answer)

Logically shifts the bits in the Accumulator (ACC) n places to the right, introducing zeros at the left.

#17
Front (Question)

Which register is always used when performing shift instructions?

Back (Answer)

The Accumulator (ACC).

#18
Front (Question)

Logical Operations as Masks (AND / OR / XOR)

Back (Answer)

#19
Front (Question)

How is the AND operator used as a mask?

Back (Answer)

To identify or “keep” specific bits, while clearing (setting to 0) all others. A bit ANDed with 1 stays the same; ANDed with 0 becomes 0.

#20
Front (Question)

How is the OR operator used as a mask?

Back (Answer)

To “set” specific bits to 1, while keeping all other bits as they are. A bit ORed with 1 becomes 1; ORed with 0 stays the same.

#21
Front (Question)

How is the XOR operator used as a mask?

Back (Answer)

To “toggle” (invert) specific bits, while keeping others the same. A bit XORed with 1 is flipped; XORed with 0 stays the same.

#22
Front (Question)

Assembly Opcodes for Logical Operations

Back (Answer)

#23
Front (Question)

What are the two types of operand allowed for the AND, OR, and XOR opcodes?

Back (Answer)

A denary or binary number (n) — i.e. an immediate value, or a memory address (<address>).

#24
Front (Question)

Where are the results of logical bit-manipulation instructions always stored?

Back (Answer)

In the Accumulator (ACC).