Bitmasken sind ein effizienter Weg ein kleine Menge an Booleans zu modifizieren.
Durch bitweise Operationen können Booleans schnell und einfach überprüft und an und aus geschaltet werden.
Sie können in verschiedenen Algorithmen, so wie der dynamische Programmierung des Travelling Salesman Problem, verwendet werden um die wichtigen (kleinen) Satz-basierten Operationen beschleunigen.
Klicke 'Nächste' (oben rechts)/drücke 'Seite nach Unten' um auf die nächste e-Lecture Folie zu kommen/ drücke 'Leertaste' um zu einer bestimmten Folie zu springen, oder klicke 'X' (unten rechts)/drück 'Esc' um zum Erkundungsmodus zu gehen.
Remarks: By default, we show e-Lecture Mode for first time (or non logged-in) visitor.
Please login if you are a repeated visitor or register for an (optional) free account first.
Pro-tip: Since you are not logged-in, you may be a first time visitor who are not aware of the following keyboard shortcuts to navigate this e-Lecture mode: [PageDown] to advance to the next slide, [PageUp] to go back to the previous slide, [Esc] to toggle between this e-Lecture mode and exploration mode.
In dieser Visualisierung unterstützen wir aktuell 6 Bitmask Operationen
Another pro-tip: We designed this visualization and this e-Lecture mode to look good on 1366x768 resolution or larger (typical modern laptop resolution in 2017). We recommend using Google Chrome to access VisuAlgo. Go to full screen mode (F11) to enjoy this setup. However, you can use zoom-in (Ctrl +) or zoom-out (Ctrl -) to calibrate this.
For source code example involving bitmask/bit manipulation, plase see:
bit_manipulation.cpp
bit_manipulation.java
bit_manipulation.py
bit_manipulation.ml
To test your understanding about bit manipulation, try our Online Quiz on bitmask topic.
And for more challenging problems involving bitmask/bit manipulation, try the following online judge problems: UVa 11933 - Splitting Numbers and Kattis - bitbybit.
e-Lecture: The content of this slide is hidden and only available for legitimate CS lecturer worldwide. Drop an email to visualgo.info at gmail dot com if you want to activate this CS lecturer-only feature and you are really a CS lecturer (show your University staff profile).
S setzten
Bit setzen
Bit überprüfen
Bit umschalten
Bit leeren
Letzter relevanter Bit