Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Bitwise operation?

Definition 3.9 High School Computer Science · Hoofdstuk 3 — Integers in the Machine

A bitwise operation works on each bit position separately. In Python, a & b has a 11 where both a and b have a 11 (and); a | b where at least one has a 11 (or); a ^ b where exactly one has a 11 (exclusive or, xor); and ~a flips every bit (not; for Python’s integers, ~a equals -a - 1).

Lees in het hoofdstuk →