You are given an 8-bit unsigned integer. Your task is to:
You must not use any lookup table or standard library function. Use pure bitwise logic.
Example-1
Input: val = 0b00011010 Output: 0b01011000 → Decimal: 88
Example-2
Input: val = 0b10110000 Output: 0b00001101 → Decimal: 13
Example-3
Input: val = 255 Output: 255 (All bits reversed remain the same)
Test Cases
Test Results
Input
26
Expected Output
88