Decimal('1000')
>>> ExtendedContext.logical_and(Decimal('1111'), Decimal('10'))
Decimal('10')
- >>> ExtendedContext.logical_and(10, 01)
- Decimal('0')
- >>> ExtendedContext.logical_and(Decimal(10), 01)
- Decimal('0')
- >>> ExtendedContext.logical_and(10, Decimal(01))
- Decimal('0')
+ >>> ExtendedContext.logical_and(110, 1101)
+ Decimal('100')
+ >>> ExtendedContext.logical_and(Decimal(110), 1101)
+ Decimal('100')
+ >>> ExtendedContext.logical_and(110, Decimal(1101))
+ Decimal('100')
"""
a = _convert_other(a, raiseit=True)
return a.logical_and(b, context=self)
Decimal('0')
>>> ExtendedContext.logical_invert(Decimal('101010101'))
Decimal('10101010')
+ >>> ExtendedContext.logical_invert(1101)
+ Decimal('111110010')
"""
a = _convert_other(a, raiseit=True)
return a.logical_invert(context=self)
Decimal('1110')
>>> ExtendedContext.logical_or(Decimal('1110'), Decimal('10'))
Decimal('1110')
- >>> ExtendedContext.logical_or(10, 01)
- Decimal('11')
- >>> ExtendedContext.logical_or(Decimal(10), 01)
- Decimal('11')
- >>> ExtendedContext.logical_or(10, Decimal(01))
- Decimal('11')
+ >>> ExtendedContext.logical_or(110, 1101)
+ Decimal('1111')
+ >>> ExtendedContext.logical_or(Decimal(110), 1101)
+ Decimal('1111')
+ >>> ExtendedContext.logical_or(110, Decimal(1101))
+ Decimal('1111')
"""
a = _convert_other(a, raiseit=True)
return a.logical_or(b, context=self)
Decimal('110')
>>> ExtendedContext.logical_xor(Decimal('1111'), Decimal('10'))
Decimal('1101')
- >>> ExtendedContext.logical_xor(10, 01)
- Decimal('11')
- >>> ExtendedContext.logical_xor(Decimal(10), 01)
- Decimal('11')
- >>> ExtendedContext.logical_xor(10, Decimal(01))
- Decimal('11')
+ >>> ExtendedContext.logical_xor(110, 1101)
+ Decimal('1011')
+ >>> ExtendedContext.logical_xor(Decimal(110), 1101)
+ Decimal('1011')
+ >>> ExtendedContext.logical_xor(110, Decimal(1101))
+ Decimal('1011')
"""
a = _convert_other(a, raiseit=True)
return a.logical_xor(b, context=self)