Python Programming - Creating a Binary Converter (Denary to Binary)

preview_player
Показать описание
Welcome to Part 14 of the Python Programming tutorial series here on Tutorial Spot.

In Part 14 I demonstrate how to create a very simple and short Binary to Denary converter in Python using very few lines of code. This simple but efficient program will convert any denary number into its binary counterpart.

The outcome is in a list variable, if you wish to change this then you can but it must still insert the new 1 or 0 at the left of the binary number it is creating.

I hope you enjoyed or found it useful.

Python 3.6.4 was used to make this tutorial.

Twitter: @TutorialSpotUK
Рекомендации по теме
Комментарии
Автор

absolute legend, 10/10 mate, I owe u a cuppa

ameliaobrien
Автор

Thank you so much for the great tutorial.

vivian
Автор

i had a school assignment for the topic that i had no idea how to do that. thanks for saving my ass

petere
Автор

Sorry I'm new to programming. How is binary insertion (0, 0) printing a 100 if I enter 4? Or some other number divisible by 2.

duke_
Автор

Great video! This is very high quality and very helpful. I was thinking about making it so you can input strings and it outputs the binary value for it in 5 bit values according to the spot in the alphabet.(a = 00001, j = 00110 etc..). I’m thinking of making a dictionary of “a” = 00001 etc but I don’t know how to search the input and print the digits in the right order. How can I do this? I’m guessing with many for loops but I’m not sure, do you have any ideas?

declspecl
Автор

very good but thats actually a denary to binary