async def bintofloat(self, ctx, *, content: commands.clean_content): """``bintofloat [bin]`` Converts a binary single (+/-) into its decimal representation.(Single) (IEE754)""" if await self.checklol(ctx): return content = content.replace(" ", "") await ctx.send(bin_to_float(content))
async def srl(self, ctx, bits, *, content: commands.clean_content): """``srl [bits to shift (base 10)] [binary number]`` shifts a binary number down filling in zeros from the left""" content = content.replace(" ", "")[:32 - int(bits)].zfill(32) await ctx.send(f"```java\n{content}```")
async def onescomp(self, ctx, *, content: commands.clean_content): """``onescomp [binary number]`` resturns the twos compliment representation of a binary number""" if await self.checklol(ctx): return content = content.replace(" ", "") await ctx.send("```java\n" + self.ones_compliment(content) + "```")