Unsigned36Bit

Struct Unsigned36Bit 

Source
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

Source

const MODULUS: u64 = 68_719_476_736u64

Source

const VALUE_BITS: u64 = 68_719_476_735u64

Source

pub const MAX: Self

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const MIN: Self = Self::ZERO

Source

pub const fn new<const N: u64>() -> Unsigned36Bit

Source

pub const fn is_zero(&self) -> bool

Source

pub const fn is_negative(&self) -> bool

Source

pub const fn is_positive(&self) -> bool

Source

pub const fn reinterpret_as_signed(&self) -> Signed36Bit

Source

pub fn wrapping_add(self, rhs: Unsigned36Bit) -> Unsigned36Bit

Source

pub fn wrapping_sub(self, rhs: Unsigned36Bit) -> Unsigned36Bit

Source

pub fn checked_add(self, rhs: Unsigned36Bit) -> Option<Unsigned36Bit>

Source

pub fn checked_sub(self, rhs: Unsigned36Bit) -> Option<Unsigned36Bit>

Source

pub fn wrapping_mul(self, rhs: Unsigned36Bit) -> Unsigned36Bit

Source

pub fn checked_mul(self, rhs: Unsigned36Bit) -> Option<Unsigned36Bit>

Source

pub fn checked_div(self, rhs: Unsigned36Bit) -> Option<Unsigned36Bit>

Source

pub const fn abs(self) -> Self

Source

pub const fn overflowing_abs(self) -> (Self, bool)

Source

pub const fn and(self, mask: u64) -> Self

Source

pub const fn bitor(self, mask: u64) -> Self

Trait Implementations§

Source§

impl BitAnd<Unsigned18Bit> for Unsigned36Bit

Source§

type Output = Unsigned18Bit

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Unsigned18Bit) -> Unsigned18Bit

Performs the & operation. Read more
Source§

impl BitAnd<Unsigned6Bit> for Unsigned36Bit

Source§

type Output = Unsigned6Bit

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Unsigned6Bit) -> Unsigned6Bit

Performs the & operation. Read more
Source§

impl BitAnd<Unsigned9Bit> for Unsigned36Bit

Source§

type Output = Unsigned9Bit

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Unsigned9Bit) -> Unsigned9Bit

Performs the & operation. Read more
Source§

impl BitAnd<u64> for Unsigned36Bit

Source§

type Output = Unsigned36Bit

The resulting type after applying the & operator.
Source§

fn bitand(self, mask: u64) -> Self

Performs the & operation. Read more
Source§

impl BitAnd for Unsigned36Bit

Source§

type Output = Unsigned36Bit

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self

Performs the & operation. Read more
Source§

impl BitOr<u64> for Unsigned36Bit

Source§

type Output = Unsigned36Bit

The resulting type after applying the | operator.
Source§

fn bitor(self, mask: u64) -> Self

Performs the | operation. Read more
Source§

impl BitOr for Unsigned36Bit

Source§

type Output = Unsigned36Bit

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self

Performs the | operation. Read more
Source§

impl BitXor<u64> for Unsigned36Bit

Source§

type Output = Unsigned36Bit

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, mask: u64) -> Self

Performs the ^ operation. Read more
Source§

impl BitXor for Unsigned36Bit

Source§

type Output = Unsigned36Bit

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self

Performs the ^ operation. Read more
Source§

impl Clone for Unsigned36Bit

Source§

fn clone(&self) -> Unsigned36Bit

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Unsigned36Bit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Unsigned36Bit

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for Unsigned36Bit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<&Address> for Unsigned36Bit

Source§

fn from(addr: &Address) -> Self

Converts to this type from the input type.
Source§

impl From<Address> for Unsigned36Bit

Source§

fn from(addr: Address) -> Self

Converts to this type from the input type.
Source§

impl From<Instruction> for Unsigned36Bit

Source§

fn from(inst: Instruction) -> Unsigned36Bit

Converts to this type from the input type.
Source§

impl From<Unsigned12Bit> for Unsigned36Bit

Source§

fn from(n: Unsigned12Bit) -> Self

Converts to this type from the input type.
Source§

impl From<Unsigned18Bit> for Unsigned36Bit

Source§

fn from(n: Unsigned18Bit) -> Self

Converts to this type from the input type.
Source§

impl From<Unsigned36Bit> for Instruction

Source§

fn from(w: Unsigned36Bit) -> Instruction

Converts to this type from the input type.
Source§

impl From<Unsigned36Bit> for i64

Source§

fn from(n: Unsigned36Bit) -> i64

Converts to this type from the input type.
Source§

impl From<Unsigned36Bit> for u64

Source§

fn from(n: Unsigned36Bit) -> u64

Converts to this type from the input type.
Source§

impl From<Unsigned5Bit> for Unsigned36Bit

Source§

fn from(n: Unsigned5Bit) -> Self

Converts to this type from the input type.
Source§

impl From<Unsigned6Bit> for Unsigned36Bit

Source§

fn from(n: Unsigned6Bit) -> Self

Converts to this type from the input type.
Source§

impl From<Unsigned9Bit> for Unsigned36Bit

Source§

fn from(n: Unsigned9Bit) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Unsigned36Bit

Source§

fn from(n: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Unsigned36Bit

Source§

fn from(n: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for Unsigned36Bit

Source§

fn from(n: u8) -> Self

Converts to this type from the input type.
Source§

impl Hash for Unsigned36Bit

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Not for Unsigned36Bit

Source§

type Output = Unsigned36Bit

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self

Performs the unary ! operation. Read more
Source§

impl Octal for Unsigned36Bit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Ord for Unsigned36Bit

Source§

fn cmp(&self, other: &Unsigned36Bit) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T> PartialEq<T> for Unsigned36Bit

Source§

fn eq(&self, other: &T) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd<u32> for Unsigned36Bit

Source§

fn partial_cmp(&self, other: &u32) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<u64> for Unsigned36Bit

Source§

fn partial_cmp(&self, other: &u64) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd for Unsigned36Bit

Source§

fn partial_cmp(&self, other: &Unsigned36Bit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for Unsigned36Bit

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Shl<u32> for Unsigned36Bit

Source§

type Output = Unsigned36Bit

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: u32) -> Self

Performs the << operation. Read more
Source§

impl Shl for Unsigned36Bit

Source§

type Output = Unsigned36Bit

The resulting type after applying the << operator.
Source§

fn shl(self, shift_by: Unsigned36Bit) -> Self

Performs the << operation. Read more
Source§

impl Shr<u32> for Unsigned36Bit

Source§

type Output = Unsigned36Bit

The resulting type after applying the >> operator.
Source§

fn shr(self, shift_by: u32) -> Self

Performs the >> operation. Read more
Source§

impl Shr for Unsigned36Bit

Source§

type Output = Unsigned36Bit

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: Self) -> Self

Performs the >> operation. Read more
Source§

impl Sum for Unsigned36Bit

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl TryFrom<Unsigned36Bit> for Address

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: Unsigned36Bit) -> Result<Address, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<Unsigned36Bit> for Unsigned18Bit

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: Unsigned36Bit) -> Result<Self, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<Unsigned36Bit> for Unsigned6Bit

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: Unsigned36Bit) -> Result<Self, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<Unsigned36Bit> for i16

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: Unsigned36Bit) -> Result<i16, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<Unsigned36Bit> for i32

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: Unsigned36Bit) -> Result<i32, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<Unsigned36Bit> for i8

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: Unsigned36Bit) -> Result<i8, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<Unsigned36Bit> for u16

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: Unsigned36Bit) -> Result<u16, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<Unsigned36Bit> for u32

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: Unsigned36Bit) -> Result<u32, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<Unsigned36Bit> for u8

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: Unsigned36Bit) -> Result<u8, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<i16> for Unsigned36Bit

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: i16) -> Result<Self, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<i32> for Unsigned36Bit

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: i32) -> Result<Self, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<i64> for Unsigned36Bit

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: i64) -> Result<Self, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<i8> for Unsigned36Bit

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: i8) -> Result<Self, ConversionFailed>

Performs the conversion.
Source§

impl TryFrom<u64> for Unsigned36Bit

Source§

type Error = ConversionFailed

The type returned in the event of a conversion error.
Source§

fn try_from(n: u64) -> Result<Self, ConversionFailed>

Performs the conversion.
Source§

impl WordCommon for Unsigned36Bit

Source§

fn signum(&self) -> Signum

Source§

impl Copy for Unsigned36Bit

Source§

impl Eq for Unsigned36Bit

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.