std::bitset::operator&=,|=,^=,~
De cppreference.com
![]() |
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
bitset<N>& operator&=( const bitset<N>& other ); |
(1) | |
bitset<N>& operator|=( const bitset<N>& other ); |
(2) | |
bitset<N>& operator^=( const bitset<N>& other ); |
(3) | |
bitset<N> operator~() const; |
(4) | |
Realiza binario AND, OR, XOR y NOT .
1) Original:
Performs binary AND, OR, XOR and NOT.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Establece los bits en el resultado de binarios y de los correspondientes pares de bits de *this y
2) other
.Original:
Sets the bits to the result of binary AND on corresponding pairs of bits of *this and
other
.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Establece los bits en el resultado de binario o en pares correspondientes de bits de *this y
3) other
.Original:
Sets the bits to the result of binary OR on corresponding pairs of bits of *this and
other
.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Establece los bits para el resultado de la operación XOR binaria en los correspondientes pares de bits de *this y
4) other
.Original:
Sets the bits to the result of binary XOR on corresponding pairs of bits of *this and
other
.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Devuelve una copia temporal de *this con todos los bits Flipped (binario NOT) .
Original:
Returns a temporary copy of *this with all bits flipped (binary NOT).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
{{{1}}}
Original:
{{{2}}}
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Contenido |
[editar] Parámetros
other | - | otro bitset
Original: another bitset The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[editar] Valor de retorno
1-3) *this
4)un <N> bitset temporal con todos los bits de la vuelta
Original:
a bitset<N> temporary with all bits flipped
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar] Ejemplo
Ejecuta este código
#include <iostream> #include <string> #include <bitset> int main() { std::bitset<16> dest; std::string pattern_str = "1001"; std::bitset<16> pattern(pattern_str); for (size_t i = 0, ie = dest.size()/pattern_str.size(); i != ie; ++i) { dest <<= pattern_str.size(); dest |= pattern; } std::cout << dest << '\n'; }
Salida:
1001100110011001
[editar] Ver también
realiza izquierda binario desplazamiento y desplazamiento a la derecha Original: performs binary shift left and shift right The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro pública) |