Forgot your password?  

Not What You Meant?  There are 40 definitions for Mask.

Mask

Print-Friendly   Order the PDF version   Order the RTF version
About 1 pages (428 words)
Mask (computing) Summary

Bookmark and Share  

Mask

A mask is a pattern of bits used as a filter to selectively accept or reject bits in a set of data. (A bit is the smallest piece of information used by modern electronic computers and consists uniquely of the binary digits 0 and 1.) For example, when defining the field of a database, a mask is assigned to indicate what type of value the field should contain (such as only alphabetic characters). Values that do not conform to the mask requirements cannot be entered into the database.

The binary image of a mask, commonly called a bit mask, is used to selectively reject or accept certain corresponding bits in a data value when the mask is used in an expression with a logical operator. When a mask is used in this way, the areas with bit values of "1" are accepted while the areas with bit values of "0" are rejected (or "masked") in the calculations. A logical (or Boolean) operator (such as AND, OR, XOR, and NOT) is used to match a mask of 0s and 1s with a string of data bits (a data value). When a "1" bit occurs in the mask, the bit in the data value remains the same, but when a "0" bit occurs in the mask, the bit in the data value is switched from 1 to 0 (while a 0 remains a 0).

For example, the mask 00111111, when used with the AND operator, removes (or "masks off") the two uppermost bits (those on the far left) in a data value (such as 11010101) but does not affect the rest of the value. Thus, in the expression "11010101 AND 00111111" the mask (00111111) takes off the "11" from the uppermost (left side) of the data value (11010101), resulting in the value 00010101.

Hardware interrupts are often enabled and disabled with software that contains masking, with each interrupt assigned a bit position in a mask register (a set of bits used to store data). A hardware interrupt is a signal that tells a computer program that an event has occurred. When a program receives an interrupt signal, it takes a specified action (either to accept or reject the signal). Interrupt signals can cause a program to suspend itself temporarily to service the interrupt. Various interrupt signals exist, such as individual keystrokes that generate an interrupt signal, and interrupts that are generated by devices (such as printers). A maskable interrupt is any hardware interrupt that can be temporarily disabled (masked) during periods when a program needs almost the entire capacity of the microprocessor.

This is the complete article, containing 428 words (approx. 1 page at 300 words per page).

More Information
  • View Mask Study Pack
  • 40 Alternative Definitions
  • Search Results for "Mask"
  • Add This to Your Bibliography
  • More Products on This Subject
    Mask (computing)
    In computer science, a mask is some data that, along with an operation, is used in order to extract ... more


    Ask any question on Mask (computing) and get it answered FAST!
    Answer questions in BookRags Q&A and earn points toward
    discounted or even FREE Study Guides and other BookRags products!
    Learn more about BookRags Q&A
    Copyrights
    Mask from World of Computer Science. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.

    Join BookRagslearn moreJoin BookRags