# Sprint 2 Module Project 1 ## csReverseIntegerBits ``` # Runtime: O(n) # Space: O(1) def csReverseIntegerBits(n): bits = bin(n)[2:] return int("0b" + bits[::-1], 2) ``` ## csBinaryToAscii ``` # Runtime: O(n) # Space: O(n) def csBinaryToASCII(binary): curr = 0 res = "" while curr < len(binary): letterBits = "0b" + binary[curr:curr + 8] characterEncodingValue = int(letterBits, 2) res += chr(characterEncodingValue) curr += 8 return res ```