Posts by Marcus Loureiro • 21 points
3 posts
-
0
votes0
answers467
viewsQ: How do I add 2 (binary)? Python
I want to add 2 to a binary number that the user enters and then add 2 binary values. EX: 111001 - 110001, I make the complement of 2 in the second number and then I make the sum of these values, I…
-
-1
votes1
answer80
viewsQ: Show all possibilities of Python numbers
How do I show all possibilities according to the number of bit quantization, for example: user: 8 levels bits: 3 need to show then: 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 my code so far,…
-
0
votes1
answer108
viewsQ: How to split a string into n equal parts in python 3.8 without using functions?
I want to split a string, in the case of a binary number, to convert into octal and Hex, but I need to divide the inserted number into equal parts, in the case of octal, I would need to divide it 3…