levo

Logic Gates and Boolean Algebra

Masking and clearing registers

  • 3 things to know
  • AS Unit 1
Start revising · £5/month

Overview

Recall questions on what a mask is, which operation isolates, sets or inverts chosen bits and what each mask must contain, worked AND, OR and XOR calculations in binary, clearing a register two ways, and testing one bit.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

What is a mask?

Key term

Which operation isolates chosen bits, and what should the mask contain?

Key term

What mask extracts the lower four bits of a byte, and what happens to the rest?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is a mask?

    Model answer

    A mask is a bit pattern combined with a value using a logical operation so that chosen bit positions are kept, set, cleared or inverted while the others are left as they are.

  2. 2

    Which operation isolates chosen bits, and what should the mask contain?

    Model answer

    AND isolates them, using a mask holding 1 in every position to be kept and 0 in every position to be discarded.

  3. 3

    What mask extracts the lower four bits of a byte, and what happens to the rest?

    Model answer

    The mask 00001111 in binary is used with AND, which leaves the lower four bits untouched and forces the upper four to 0.

  4. 4

    Calculate 11010110 AND 00001111, both in binary, and give the denary result.

    Model answer

    The result is 00000110 in binary, which is 6 in denary, because only the lower four bits of the first value survive the mask.

  5. 5

    Which operation sets chosen bits to 1, and what should the mask contain?

    Model answer

    OR sets them, using a mask holding 1 in every position to be turned on and 0 everywhere else so those positions keep their existing values.

  6. 6

    Calculate 10010000 OR 00001111, both in binary.

    Model answer

    The result is 10011111 in binary, because the lower four bits are forced to 1 and the upper four are unchanged.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

Fetch, , execute.
decodecompilestore

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

A bit is a single binary digit.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Logic Gates and Boolean Algebra, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.