0% found this document useful (0 votes)
7 views

Reduction Operator

The reduction operators are and (&), nand (~&), or (|), nor (~|), xor (^), and xnor (~^). They perform a bit-by-bit logical operation on two operands to produce a single-bit result. The document provides examples of reduction operations and their results, and notes that reduction operators take one operand while bitwise operators take two. It also provides an exercise evaluating reduction operations.

Uploaded by

Bruno Silva
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Reduction Operator

The reduction operators are and (&), nand (~&), or (|), nor (~|), xor (^), and xnor (~^). They perform a bit-by-bit logical operation on two operands to produce a single-bit result. The document provides examples of reduction operations and their results, and notes that reduction operators take one operand while bitwise operators take two. It also provides an exercise evaluating reduction operations.

Uploaded by

Bruno Silva
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

27/12/12

Reduction Operator

Reduction Operator
Keysymbols: &, ~&, |, ~|, ^, ~^, ^~. The reduction operators are and, nand, or, nor, xor xnor and an alternative xnor. They take one operand and perform a bit-by-next-bit operation, starting with the two leftmost bits, giving a 1-bit result.
mdl rdcTs; oue eutet rg[:]a b,; e 30 , c iiilbgn nta ei a=4b11 '11; b=4b11 '00; c=4b01 '01; $ipab&a;/ btiead (aea 1111,eautst 1 dsly( ) / iws n, sm s &&&) vlae o $ipab|b;/ btie o,(aea 0101,eautst 1 dsly( ) / iws r sm s |||) vlae o $ipab^b;/ btiexr (aea 0101,eautst 0 dsly( ) / iws o, sm s ^^^) vlae o ed n edoue/ rdcTs nmdl / eutet

Note: the bitwise xor and xnor are useful in generating parity checks. Please note carefully the differences in logical, bitwise and reduction operators. The symbols for bitwise and reduction overlap but the number of operands is different in those cases. EXERCISE What do the following evaluate to ?
$ipab&1b0; dsly( '1) $ipab|3b0x; dsly( '11) $ipab^4b11; dsly( '10)

Answers previous next contents

www.see.ed.ac.uk/~gerard/Teach/Verilog/manual/Operators/reduction.html

1/1

You might also like