close
Espacios de nombres
Variantes

operator&,|,^(std::bitset)

De cppreference.com
 
 
Biblioteca de servicios
 
std::bitset
Tipos de miembros
Original:
Member types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Las funciones miembro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Elemento acceso
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Capacidad
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Modificadores
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversiones
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Terceros funciones
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Clases de ayuda
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
 
<tbody> </tbody>
bitset<N> operator&( const bitset<N>& lhs, const bitset<N>& rhs );
(1)
bitset<N> operator|( const bitset<N>& lhs, const bitset<N>& rhs );
(2)
bitset<N> operator^( const bitset<N>& lhs, const bitset<N>& rhs );
(3)
Realiza binario AND, OR, y XOR entre dos bitsets, lhs y rhs .
Original:
Performs binary AND, OR, and XOR between two bitsets, lhs and rhs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

1)

Devuelve una bitset<N> que contiene el resultado de binarios y en los correspondientes pares de bits de lhs y rhs .
Original:
Returns a bitset<N> containing the result of binary AND on corresponding pairs of bits of lhs and rhs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

2)

Devuelve una bitset<N> que contiene el resultado de binario OR en pares correspondientes de bits de lhs y rhs .
Original:
Returns a bitset<N> containing the result of binary OR on corresponding pairs of bits of lhs and rhs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

3)

Devuelve una bitset<N> que contiene el resultado de la operación XOR binaria en los correspondientes pares de bits de lhs y rhs .
Original:
Returns a bitset<N> containing the result of binary XOR on corresponding pairs of bits of lhs and rhs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Parámetros

lhs -
la bitset en el lado izquierdo del operador
Original:
the bitset on the left-hand side of the operator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rhs -
la bitset en el lado derecho del operador
Original:
the bitset on the right-hand side of the operator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Valor de retorno

1)

{{{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.

2)

{{{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.

3)

{{{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.

Excepciones

Especificación noexcept:  
<tbody> </tbody>
noexcept
  (desde C++11)

Ejemplo

#include <bitset>
#include <iostream>

int main()
{
    std::bitset<4> b1("0110");
    std::bitset<4> b2("0011");
    std::cout << "b1 & b2: " << (b1 & b2) << '\n';
    std::cout << "b1 | b2: " << (b1 | b2) << '\n';
    std::cout << "b1 ^ b2: " << (b1 ^ b2) << '\n';
}

Salida:

b1 & b2: 0010
b1 | b2: 0111
b1 ^ b2: 0101

Ver también

realiza operación binaria AND, OR, XOR y NOT
(función miembro pública) [editar]