pub struct Unsigned36Bit {
pub(crate) bits: u64,
}
Expand description
Unsigned36Bit
is the basic machine word of the TX-2. This is
the width of the registers in the Arithmetic Unit, and it is the
unit on which the Exchange Unit operates when performing memory
fetches or stores. This is also the width of all instructions.
Fields§
§bits: u64
Implementations§
Source§impl Unsigned36Bit
impl Unsigned36Bit
const MODULUS: u64 = 68_719_476_736u64
const VALUE_BITS: u64 = 68_719_476_735u64
pub const MAX: Self
pub const ZERO: Self
pub const ONE: Self
pub const MIN: Self = Self::ZERO
pub const fn new<const N: u64>() -> Unsigned36Bit
pub const fn is_zero(&self) -> bool
pub const fn is_negative(&self) -> bool
pub const fn is_positive(&self) -> bool
pub const fn reinterpret_as_signed(&self) -> Signed36Bit
pub fn wrapping_add(self, rhs: Unsigned36Bit) -> Unsigned36Bit
pub fn wrapping_sub(self, rhs: Unsigned36Bit) -> Unsigned36Bit
pub fn checked_add(self, rhs: Unsigned36Bit) -> Option<Unsigned36Bit>
pub fn checked_sub(self, rhs: Unsigned36Bit) -> Option<Unsigned36Bit>
pub fn wrapping_mul(self, rhs: Unsigned36Bit) -> Unsigned36Bit
pub fn checked_mul(self, rhs: Unsigned36Bit) -> Option<Unsigned36Bit>
pub fn checked_div(self, rhs: Unsigned36Bit) -> Option<Unsigned36Bit>
pub const fn abs(self) -> Self
pub const fn overflowing_abs(self) -> (Self, bool)
pub const fn and(self, mask: u64) -> Self
pub const fn bitor(self, mask: u64) -> Self
Trait Implementations§
Source§impl BitAnd<Unsigned18Bit> for Unsigned36Bit
impl BitAnd<Unsigned18Bit> for Unsigned36Bit
Source§type Output = Unsigned18Bit
type Output = Unsigned18Bit
The resulting type after applying the
&
operator.Source§fn bitand(self, rhs: Unsigned18Bit) -> Unsigned18Bit
fn bitand(self, rhs: Unsigned18Bit) -> Unsigned18Bit
Performs the
&
operation. Read moreSource§impl BitAnd<Unsigned6Bit> for Unsigned36Bit
impl BitAnd<Unsigned6Bit> for Unsigned36Bit
Source§type Output = Unsigned6Bit
type Output = Unsigned6Bit
The resulting type after applying the
&
operator.Source§fn bitand(self, rhs: Unsigned6Bit) -> Unsigned6Bit
fn bitand(self, rhs: Unsigned6Bit) -> Unsigned6Bit
Performs the
&
operation. Read moreSource§impl BitAnd<Unsigned9Bit> for Unsigned36Bit
impl BitAnd<Unsigned9Bit> for Unsigned36Bit
Source§type Output = Unsigned9Bit
type Output = Unsigned9Bit
The resulting type after applying the
&
operator.Source§fn bitand(self, rhs: Unsigned9Bit) -> Unsigned9Bit
fn bitand(self, rhs: Unsigned9Bit) -> Unsigned9Bit
Performs the
&
operation. Read moreSource§impl BitAnd<u64> for Unsigned36Bit
impl BitAnd<u64> for Unsigned36Bit
Source§impl BitAnd for Unsigned36Bit
impl BitAnd for Unsigned36Bit
Source§impl BitOr<u64> for Unsigned36Bit
impl BitOr<u64> for Unsigned36Bit
Source§impl BitOr for Unsigned36Bit
impl BitOr for Unsigned36Bit
Source§impl BitXor<u64> for Unsigned36Bit
impl BitXor<u64> for Unsigned36Bit
Source§impl BitXor for Unsigned36Bit
impl BitXor for Unsigned36Bit
Source§impl Clone for Unsigned36Bit
impl Clone for Unsigned36Bit
Source§fn clone(&self) -> Unsigned36Bit
fn clone(&self) -> Unsigned36Bit
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Unsigned36Bit
impl Debug for Unsigned36Bit
Source§impl Default for Unsigned36Bit
impl Default for Unsigned36Bit
Source§impl Display for Unsigned36Bit
impl Display for Unsigned36Bit
Source§impl From<&Address> for Unsigned36Bit
impl From<&Address> for Unsigned36Bit
Source§impl From<Address> for Unsigned36Bit
impl From<Address> for Unsigned36Bit
Source§impl From<Instruction> for Unsigned36Bit
impl From<Instruction> for Unsigned36Bit
Source§fn from(inst: Instruction) -> Unsigned36Bit
fn from(inst: Instruction) -> Unsigned36Bit
Converts to this type from the input type.
Source§impl From<Unsigned12Bit> for Unsigned36Bit
impl From<Unsigned12Bit> for Unsigned36Bit
Source§fn from(n: Unsigned12Bit) -> Self
fn from(n: Unsigned12Bit) -> Self
Converts to this type from the input type.
Source§impl From<Unsigned18Bit> for Unsigned36Bit
impl From<Unsigned18Bit> for Unsigned36Bit
Source§fn from(n: Unsigned18Bit) -> Self
fn from(n: Unsigned18Bit) -> Self
Converts to this type from the input type.
Source§impl From<Unsigned36Bit> for Instruction
impl From<Unsigned36Bit> for Instruction
Source§fn from(w: Unsigned36Bit) -> Instruction
fn from(w: Unsigned36Bit) -> Instruction
Converts to this type from the input type.
Source§impl From<Unsigned36Bit> for i64
impl From<Unsigned36Bit> for i64
Source§fn from(n: Unsigned36Bit) -> i64
fn from(n: Unsigned36Bit) -> i64
Converts to this type from the input type.
Source§impl From<Unsigned36Bit> for u64
impl From<Unsigned36Bit> for u64
Source§fn from(n: Unsigned36Bit) -> u64
fn from(n: Unsigned36Bit) -> u64
Converts to this type from the input type.
Source§impl From<Unsigned5Bit> for Unsigned36Bit
impl From<Unsigned5Bit> for Unsigned36Bit
Source§fn from(n: Unsigned5Bit) -> Self
fn from(n: Unsigned5Bit) -> Self
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for Unsigned36Bit
impl From<Unsigned6Bit> for Unsigned36Bit
Source§fn from(n: Unsigned6Bit) -> Self
fn from(n: Unsigned6Bit) -> Self
Converts to this type from the input type.
Source§impl From<Unsigned9Bit> for Unsigned36Bit
impl From<Unsigned9Bit> for Unsigned36Bit
Source§fn from(n: Unsigned9Bit) -> Self
fn from(n: Unsigned9Bit) -> Self
Converts to this type from the input type.
Source§impl From<u16> for Unsigned36Bit
impl From<u16> for Unsigned36Bit
Source§impl From<u32> for Unsigned36Bit
impl From<u32> for Unsigned36Bit
Source§impl From<u8> for Unsigned36Bit
impl From<u8> for Unsigned36Bit
Source§impl Hash for Unsigned36Bit
impl Hash for Unsigned36Bit
Source§impl Not for Unsigned36Bit
impl Not for Unsigned36Bit
Source§impl Octal for Unsigned36Bit
impl Octal for Unsigned36Bit
Source§impl Ord for Unsigned36Bit
impl Ord for Unsigned36Bit
Source§fn cmp(&self, other: &Unsigned36Bit) -> Ordering
fn cmp(&self, other: &Unsigned36Bit) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T> PartialEq<T> for Unsigned36Bit
impl<T> PartialEq<T> for Unsigned36Bit
Source§impl PartialOrd<u32> for Unsigned36Bit
impl PartialOrd<u32> for Unsigned36Bit
Source§impl PartialOrd<u64> for Unsigned36Bit
impl PartialOrd<u64> for Unsigned36Bit
Source§impl PartialOrd for Unsigned36Bit
impl PartialOrd for Unsigned36Bit
Source§impl Serialize for Unsigned36Bit
impl Serialize for Unsigned36Bit
Source§impl Shl<u32> for Unsigned36Bit
impl Shl<u32> for Unsigned36Bit
Source§impl Shl for Unsigned36Bit
impl Shl for Unsigned36Bit
Source§type Output = Unsigned36Bit
type Output = Unsigned36Bit
The resulting type after applying the
<<
operator.Source§fn shl(self, shift_by: Unsigned36Bit) -> Self
fn shl(self, shift_by: Unsigned36Bit) -> Self
Performs the
<<
operation. Read moreSource§impl Shr<u32> for Unsigned36Bit
impl Shr<u32> for Unsigned36Bit
Source§impl Shr for Unsigned36Bit
impl Shr for Unsigned36Bit
Source§impl Sum for Unsigned36Bit
impl Sum for Unsigned36Bit
Source§impl TryFrom<Unsigned36Bit> for Address
impl TryFrom<Unsigned36Bit> for Address
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§fn try_from(n: Unsigned36Bit) -> Result<Address, ConversionFailed>
fn try_from(n: Unsigned36Bit) -> Result<Address, ConversionFailed>
Performs the conversion.
Source§impl TryFrom<Unsigned36Bit> for Unsigned18Bit
impl TryFrom<Unsigned36Bit> for Unsigned18Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§fn try_from(n: Unsigned36Bit) -> Result<Self, ConversionFailed>
fn try_from(n: Unsigned36Bit) -> Result<Self, ConversionFailed>
Performs the conversion.
Source§impl TryFrom<Unsigned36Bit> for Unsigned6Bit
impl TryFrom<Unsigned36Bit> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§fn try_from(n: Unsigned36Bit) -> Result<Self, ConversionFailed>
fn try_from(n: Unsigned36Bit) -> Result<Self, ConversionFailed>
Performs the conversion.
Source§impl TryFrom<Unsigned36Bit> for i16
impl TryFrom<Unsigned36Bit> for i16
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§fn try_from(n: Unsigned36Bit) -> Result<i16, ConversionFailed>
fn try_from(n: Unsigned36Bit) -> Result<i16, ConversionFailed>
Performs the conversion.
Source§impl TryFrom<Unsigned36Bit> for i32
impl TryFrom<Unsigned36Bit> for i32
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§fn try_from(n: Unsigned36Bit) -> Result<i32, ConversionFailed>
fn try_from(n: Unsigned36Bit) -> Result<i32, ConversionFailed>
Performs the conversion.
Source§impl TryFrom<Unsigned36Bit> for i8
impl TryFrom<Unsigned36Bit> for i8
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§fn try_from(n: Unsigned36Bit) -> Result<i8, ConversionFailed>
fn try_from(n: Unsigned36Bit) -> Result<i8, ConversionFailed>
Performs the conversion.
Source§impl TryFrom<Unsigned36Bit> for u16
impl TryFrom<Unsigned36Bit> for u16
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§fn try_from(n: Unsigned36Bit) -> Result<u16, ConversionFailed>
fn try_from(n: Unsigned36Bit) -> Result<u16, ConversionFailed>
Performs the conversion.
Source§impl TryFrom<Unsigned36Bit> for u32
impl TryFrom<Unsigned36Bit> for u32
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§fn try_from(n: Unsigned36Bit) -> Result<u32, ConversionFailed>
fn try_from(n: Unsigned36Bit) -> Result<u32, ConversionFailed>
Performs the conversion.
Source§impl TryFrom<Unsigned36Bit> for u8
impl TryFrom<Unsigned36Bit> for u8
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§fn try_from(n: Unsigned36Bit) -> Result<u8, ConversionFailed>
fn try_from(n: Unsigned36Bit) -> Result<u8, ConversionFailed>
Performs the conversion.
Source§impl TryFrom<i16> for Unsigned36Bit
impl TryFrom<i16> for Unsigned36Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<i32> for Unsigned36Bit
impl TryFrom<i32> for Unsigned36Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<i64> for Unsigned36Bit
impl TryFrom<i64> for Unsigned36Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<i8> for Unsigned36Bit
impl TryFrom<i8> for Unsigned36Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<u64> for Unsigned36Bit
impl TryFrom<u64> for Unsigned36Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl WordCommon for Unsigned36Bit
impl WordCommon for Unsigned36Bit
impl Copy for Unsigned36Bit
impl Eq for Unsigned36Bit
Auto Trait Implementations§
impl Freeze for Unsigned36Bit
impl RefUnwindSafe for Unsigned36Bit
impl Send for Unsigned36Bit
impl Sync for Unsigned36Bit
impl Unpin for Unsigned36Bit
impl UnwindSafe for Unsigned36Bit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.