into_bitwise

Function into_bitwise 

Source
pub const fn into_bitwise(a: u32, b: u32) -> u64
Expand description

Combines two 32-bit values into a single 64-bit value using bitwise operations.

This function takes two 32-bit unsigned integers, a and b, and combines them into a single 64-bit unsigned integer using bitwise operations. The value a is stored in the lower 32 bits of the result, and the value b is stored in the upper 32 bits.

§Arguments

  • a - The lower 32 bits of the resulting 64-bit value.
  • b - The upper 32 bits of the resulting 64-bit value.

§Returns

A 64-bit unsigned integer obtained by combining the input values a and b using bitwise OR and left shift operations.

§Examples

use plugy_core::bitwise::into_bitwise;
let a: u32 = 0x5678_9ABC;
let b: u32 = 0x0000_1234;
let combined = into_bitwise(a, b);
assert_eq!(combined, 0x0000_1234_5678_9ABC);