#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>

uint32_t getRegisterUInt32(uint16_t highWord, uint16_t lowWord) {
    uint32_t val = (highWord << 16) +  lowWord;
    return val;
} 

int32_t getRegisterInt32(uint16_t highWord, uint16_t lowWord) {
    int32_t val = (highWord << 16) +  lowWord;
    return val;
} 

int64_t getRegisterInt64(uint16_t word1, uint16_t word2, uint16_t word3, uint16_t word4) {
    uint64_t val = ((uint64_t)word1 << 48) + ((uint64_t)word2 << 32) + (word3 << 16)  + word4;
    return val;
} 

float getRegisterFloat(uint16_t highWord, uint16_t lowWord) {
    uint32_t floatRaw = ((uint32_t)highWord << 16) | lowWord; 
    float floatValue;
    
    memcpy(&floatValue, &floatRaw, sizeof(float));
    return floatValue;
} 

