JavaScript Programming Tutorial 17 - Converting Decimal Numbers to Binary, Octal, and Hexadecimal

preview_player
Показать описание


~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
Рекомендации по теме
Комментарии
Автор

Long time subscriber here. Just want to say I love your videos! Really appreciate all the work you do helping to teach others. I wish you lots of success! 🙂

stephanier.
Автор

#Important
parseInt(11, 2) does NOT convert it to BINARY. When you add 11 with base 2. This means you want to convert a binary to decimal since you make it clear with base 2. Ex could be parseInt(11010101, 2) //==> 213 or //==>13633 so now how to convert decimal to binary well you add toString() with the base in the end function parseInt. Ex parseInt(13633, 10).toString(2) // or parseInt(213, 10).toString(2) //==> 11010101

sakinemazlomyar
Автор

loved it man....once you become famous you won't fall down never I think...love from Bangladesh

Asifkhan-tunb
Автор

this was straightforward and helpful thank you :)

lycan
Автор

Don't be so apologetic about this. This is very useful when you need it. I have Bit Shifted many times in Assembly and C and was really Glad JS had these functions. Great lesson.

danielmadison
Автор

Just started JS and holy mother of pearl this is gonna get hard. I lit have to learn 10 new phrases for every phrase he uses to understand anything.

jackfrancis
Автор

So JS does the heavylifting of the actual algorithm to convert it to different bases, we just specify the base. Pretty cool!

EnglishRain
Автор

"yo yo what's happenin everybody"
*subscribes*

aZnchuux
Автор

Great videos! What does the radix signify here and why do you use 2, 8, and 16 for binary, octal, and hex, respectively?

stealtime
Автор

Thanks Alot Caleb!!
Very Nice Tutorial!

masterdatta
Автор

I'm applying to jobs. Thank you for this brother!

spaceghost
Автор

function binToDec(bin){
const digit = parseInt(bin, 2);
return digit;
}

sergodemachina
Автор

It might be a REAL GOOD IDEA to post the code

escapefelicity
Автор

What a mess. You just say 11 = 3 in binary. WTF?

greatreboot