Is it possible to program in binary?

Of course. It’s more commonly called machine code. It’s basically assembly language without the mnemonic devices. Someone who knows assembly very well could program in machine code with additional effort, referring to opcode listings (e.g. x86) as needed. Would I do it? No. Even assembly is only useful in rare circumstances, and there’s no reason (beside demonstrating your skills) … Read more

Converting an integer to binary in C

If you want to transform a number into another number (not number to string of characters), and you can do with a small range (0 to 1023 for implementations with 32-bit integers), you don’t need to add char* to the solution HalosGhost suggested to compact the code into a single line

convert decimal numbers to excess-127 representations

Assuming you are referring to Offset binary: https://en.wikipedia.org/wiki/Offset_binary, of which the most famous example would be Excess-3: https://en.wikipedia.org/wiki/Excess-3, then the solution would be: a) 77 + 127 mod 256 = 204 mod 256 = 204 = 11001100 b) -42 + 127 mod 256 = 85 mod 256 = 85 = 01010101 etc…

Converting integer to binary in python

Just to explain the parts of the formatting string: {} places a variable into a string 0 takes the variable at argument position 0 : adds formatting options for this variable (otherwise it would represent decimal 6) 08 formats the number to eight digits zero-padded on the left b converts the number to its binary … Read more

How to used the alphabet binary symbols

You would only need 5 bits because you are counting to 26 (if we take only upper or lowercase letters). 5 bits will count up to 31, so you’ve actually got more space than you need. You can’t use 4 because that only counts to 15. If you want both upper and lowercase then 6 … Read more