Binary & Hexadecimal Demystified

  Переглядів 14,840

NesHacker

NesHacker

День тому

In this video I cover the basics of binary and hexadecimal numbers and explore how they're used.
Support the channel on Patreon: / neshacker
ASCII Table: www.man7.org/linux/man-pages/...
Hex to Binary Conversion Table: kb.iu.edu/d/afdl
Chapters:
0:00 Introduction
0:28 Topic Overview
1:45 Decimal Numbers
4:01 Binary Numbers
6:16 Quick Recap
7:00 Why Binary?
7:51 Why Hexadecimal?
9:47 Hexadecimal Numbers
10:52 Hex to Binary
12:21 Binary to Hex
12:39 Hex to ASCII
13:53 Binary, Hex, & ASCII Challenge
14:12 Conclusion

КОМЕНТАРІ: 78
@Max-rw8nc
@Max-rw8nc 2 роки тому
As someone with no math/computing background, you did a great job!! I now understand binary and hex!! Thank you!
@NesHacker
@NesHacker 2 роки тому
Awesome!
@germantapia9349
@germantapia9349 9 місяців тому
I wish my teachers from college would have been this great at explaining this complex topic this easy. It would make my life and career much, much easier. You're a great teacher. Is really a shame this channel don't have more views. You're are a great content creator. You have a great passion, is something you love and can make anyone interested. Congratulations and i hope you will keep on creating content.
@NesHacker
@NesHacker 8 місяців тому
That is very high praise, thank you very much and rest assured I do intend to keep making more content ☺️
@djfredmiami
@djfredmiami Рік тому
Ryan, you are a FANTASTIC teacher above all your other skills. I was never in my life able to understand low level programming until i started following your channel.
@NesHacker
@NesHacker Рік тому
Thank you! I am really glad I could help :)
@einsteinx2
@einsteinx2 2 роки тому
Really love your presentation style! Very clear and well spoken. I’ve watched a few of your videos since finding the channel recently and they’ve all been similarly well done. Looking forward to more!
@marinftw
@marinftw 2 роки тому
I just stumbled upon your channel and feel like I found a mine of gold. Thank you so much for the great content! keep the awesome work going.
@riyantan9237
@riyantan9237 2 роки тому
Such a great explanation!!
@NesHacker
@NesHacker 2 роки тому
Appreciate it!
@keithstone001
@keithstone001 2 роки тому
This is amazing. Very interesting. I love 3502, z80, and 68000 CPU infrastructure and I've always wanted to learn about machine language programming. I would love to make mods for games that use this stuff. Good work!
@NesHacker
@NesHacker 2 роки тому
Thanks! I'm happy you're liking the channel :)
@keithstone001
@keithstone001 2 роки тому
Derp *6502 lol oops
@matthewcurtis9192
@matthewcurtis9192 2 роки тому
You actually taught me something which school didn't. I always found mathematics a challenge (even though I work in IT now), but I had no idea what *in the power of* actually meant until today. Thanks!
@NesHacker
@NesHacker 2 роки тому
Math is so hard to teach, sometimes it's like a "right place / time / explanation" thing. I have so many "aha!" moments throughout the years that came from messing around with it outside the classroom or seeing a video done by a particularly adept teacher (like 3blue1brown)
@Nosy1
@Nosy1 Рік тому
Great content. I bless the algorithm gods to show your channel for me.
@0RottenLuck0
@0RottenLuck0 Рік тому
Great content. Thank you
@chadrem
@chadrem 3 роки тому
Solid explanation!
@NesHacker
@NesHacker 3 роки тому
Appreciate it. I thought this would be relatively easy but it was a lot harder to summarize the topic than I thought.
@videoki
@videoki 20 днів тому
Excellent! Thank you!
@HyagoPinheiro
@HyagoPinheiro 2 роки тому
This video should be used on Computer Science 101 classes. It's very easy to follow and understand. Thank you!
@ohaia23
@ohaia23 4 місяці тому
Thank you for your tutorial,as someone with lack on math and computing,i now understand this!!
@NesHacker
@NesHacker 4 місяці тому
I’m glad I could help!
@martinrombach2666
@martinrombach2666 Місяць тому
this is so good thanks so much
@weichun255
@weichun255 Рік тому
Perfect. Thank you.
@NesHacker
@NesHacker Рік тому
You're welcome!
@TheCasualSubculturist
@TheCasualSubculturist 2 роки тому
9:10 I love how you brought image of Japan... and have New Game! poster in it, which is anime about making video game.
@sethparnell3929
@sethparnell3929 Рік тому
Fantastic Video! keep up the good work. :)
@user-oj1cj2hn8d
@user-oj1cj2hn8d 6 місяців тому
Great or best video out of on UKposts 🎉🎉❤😊
@LiquidTurbo
@LiquidTurbo Рік тому
Great video!
@DIPper352
@DIPper352 Рік тому
Mad respect to this dude Now i can learn 6502 My dream retro cpu
@BillAnt
@BillAnt 8 місяців тому
My favorite hex is EA (NOP) hehe
@TVsMrNeil
@TVsMrNeil 2 роки тому
get well soon mom! love ryan
@NesHacker
@NesHacker 2 роки тому
It’s been over a year since I put that Easter egg in the video, and you’re the first to find it :D
@consis
@consis 2 роки тому
better math = better game
@NesHacker
@NesHacker 2 роки тому
Heckin' yeah. Computer science is founded, almost entirely, in mathematics. It's an indispensable tool for making games. I'm actually planning on doing more videos about game math and algorithms in the future. So something to look forward to :)
@AggressiveMenace
@AggressiveMenace Рік тому
Discrete mathematics book detected! Probably one of the best resources for CS/CE students, self-learners, and hobbyist. Computers and code machine are basically a form of mathematics itself.
@NesHacker
@NesHacker Рік тому
Heckin’ yeah, that’s my original one from college. I still reference it from time to time :)
@andueskitzoidneversolo2823
@andueskitzoidneversolo2823 Рік тому
great easy to understand information here, thank you. I am just a newb floating around slowly learning things. would it be wrong to look at the binary as the sounds letters make. then look at the 8bit byte as a letter, and the 16bit hex are the words the letters make? then ascii is the definition of what the words mean? ... i am a completely newb at all things programming and i am trying to learn it from fundamental principals. ive started off with learning a bit about TTL logic and taught my self binary, however i think my MSB is on the left when it seems most examples i see is on the right. so far i have build registers, timers, buffers, and a working 4 bit ALU. it can only do addition and subtraction. and its only a ripple carry adder. but i became addicted to learning more after i figured out how to build my own calculators from relay switches. thank you for this video. i now know my next thing i must learn is how to understand, count, and do math in base 16. i am just now getting to a point where realize i can address a kind of operational code. i dont know if that is short for opp code but im going with it, by making a bank store a little operation like adding 1 to the bus, or placing a 3 in bank 2. i do not have to do that my self. i can make an address that can do that for me. i been eating up videos about 6502 assembly and i have this delusional thought that i am going to rebuild the entire NES system in a game called logic world by learning it from core concepts. lol. yea, i have too much time on my hands.
@TheSlyflyChannel
@TheSlyflyChannel Рік тому
Hey Ryan, it’s probably just a royalty free tune but where did you get your intro music from. It sounds familiar. If it came from a song, what song? Thanks in advance. Love your videos.
@NesHacker
@NesHacker Рік тому
I wrote and recorded the intro :)
@TheSlyflyChannel
@TheSlyflyChannel Рік тому
@@NesHacker Awesome job. Sounds very pleasing. My compliments.
@TheSlyflyChannel
@TheSlyflyChannel Рік тому
@@NesHacker kind of disappointed though. I was hoping this would give me a new artist to listen too. Maybe in the future. 👀
@calixtonavarro2507
@calixtonavarro2507 Рік тому
Best wishes to your mom!
@NesHacker
@NesHacker Рік тому
She's doing great, nicely done finding the Easter egg :D
@inceptional
@inceptional 2 роки тому
So, let me see if I understand this correctly: Binary numbers can be written in any length/amount of digits; when converting binary to hexadecimal, the binary number sequences are broken down into sets of 4 digits (and we just use the lookup table to see what those are); hexadecimal is always written as two digits; and for the ascii I just use the lookup table to see which hexadecimal value is equal to whatever number/letter/symbol?
@khatharrmalkavian3306
@khatharrmalkavian3306 2 роки тому
Mathematically hex numbers can have any number of digits, but in a hex editor they're usually broken into two digit values because two hex digits maps to one byte. When writing programs it's not uncommon to use longer hex numbers, although the NES doesn't really encouter this because it's an 8bit system and thus works on single-byte values. Likewise, binary values can have any number of digits, but in computing representations they're often grouped into series of four bits, or sometimes eight, although in those cases there's usually a small gap in the middle to separate the eight bits into two groups of four. Incidentally, while eight bits is referred to as a byte, the four bit sequences are sometimes called a nybble. ASCII can be worked with using a chart, but most hex editors have a "character" field to the right hand side of each line of bytes, where the ASCII representation of the bytes is displayed and can be edited directly. HxD is a free hex editor that you can use to examine or edit files on your PC, if you want to become familiar with hex editors. Alternatively, the NES emulator Mesen has a full suite of hacking and debugging tools that includes hex editors for viewing the RAM and ROM contents while running a game.
@khatharrmalkavian3306
@khatharrmalkavian3306 2 роки тому
Oh, I forgot to mention, but yes, four bits correspond to one hex digit. However, it's much easier to just learn to read four bit values in your head and memorize the decimal values of A thru F. Then you can easily do conversions on the fly rather than using a chart.
@angeldude101
@angeldude101 Місяць тому
Hexadecimal is usually written as 2 digits because they're used as an expansion for what basically base-256, kind of like how digital clocks effectively display base-60 numbers using pairs of decimal digits for each base-16 digit. For ASCII letters, it's actually possible to convert directly from binary to a letter and back. If the binary starts with 010_____, then it's an uppercase letter, and if it starts with 011_____, then it's a lower case letter. The remaining 5 digits directly count from 1 to 26 mapping the range to the letters A through Z. You may not of something else that usually has 5 "digits", and while it can take good dexterity to represent the entire range as distinguishable values, it's possible to count from 0 to 31 (which contains the numbers between 1 and 26) on a single hand by treating each finger as a distinct bit, while sounding out the alphabet to tell which letter maps to which 5-bit number. If the number instead starts with 0011____, then it's likely a number, with the remaining 4 bits being the binary form of the digit in question, and can also be counted on one's fingers from 0 to 9 if you haven't memorized the 1 digit decimal-binary conversions. For symbols, there's not much you can do to avoid memorizing or looking up the chart. The best I can say there is that 000_____ are control codes that don't map to any symbols, and 0010_0000 (20₁₆ = 32₁₀) is space.
@torarinvik4920
@torarinvik4920 2 роки тому
lol ACDC. Let there be binary!!!
@NesHacker
@NesHacker 2 роки тому
I totally forgot I added that little joke xD
@torarinvik4920
@torarinvik4920 2 роки тому
@@NesHacker :D
@Lita1
@Lita1 Рік тому
👍
@mcmurdostation7134
@mcmurdostation7134 2 роки тому
I love your videos could I ask you what's your Background or where did you start to learn all those things, what was your first programming language?
@NesHacker
@NesHacker 2 роки тому
I taught myself to program as a kid when I got ahold of a floppy containing a bunch of QBasic code and games. Kinda kept going from there and ended up getting a degree in computer science.
@jay-nomad6560
@jay-nomad6560 Рік тому
im sorry how did you find the binary for your name?? i was a little confused because you showed it before the ASCII table... i got my name using the table but i was wondering if you found it without it... i dont know if i did it right.. 01001010 01001111 01000101 then i converted the binary to decimal 74 79 69
@NesHacker
@NesHacker Рік тому
Haha, no I used the table. :)
@egfelixdcg
@egfelixdcg 2 роки тому
52 4F 44 52 49 47 4F
@NesHacker
@NesHacker 2 роки тому
Nice :D
@rryan916
@rryan916 Рік тому
Why do people always skip the part of explaining WHAT NUMBERS REPRESENT WHAT LETTERS. It’s mad frustrating. Perfect explanation of converting from decimal to binary. And then they always skip to…. Anyway here’s letters. YOU HAVE TO TELL US WHAT LETTER IS REPRESENTED BY WHAT NUMBER. It would be like explaining the decimal system and saying…. Ok here is 1 and 2 and 3 …. Then after 9 we switch to a 1 and a 0 together! Then we continue 11, 12, 13 and so on…. Anyway… this is how you spell JAMES. What?! You have to tell me first that 12 = J or that 247 = M
@NesHacker
@NesHacker Рік тому
I am confused... At 9:59 I explain what all the numbers and letters mean. Was it not clear or something?
@rryan916
@rryan916 Рік тому
Yeah sorry, that part was actually. I was commenting in order of watching it. But funnily enough, like… still it’s such a funny leap that people always make when explaining binary. There needs to be this one… totally different section that says. “Now… once we have that, different people come up with different codes in order to represent different symbols.” They just jump straight to letters, which you DID do. But then, thankfully, you happened to explain it later. Like… in the order of the video, you’d say this looks like jibberish. And I’m like… yeah of course it does. You just spent 10 minutes telling me this is all about numbers and now, with no explanation you just told me it now represents, letters? But yes, you got to it later. Thanks! I assume then… that there are other codes that use different lettering systems? I actually don’t know.
@rryan916
@rryan916 Рік тому
But you know what? It still is weird… because you start by saying my name represent in binary. But that’s weird and misleading, like… your name doesn’t start by being representing in binary. But you make it seem that way. It STARTS as letters, that THEN (I suppose through ASCII) it gets coded into a number. So like A is 65? B is 66? C is 67? Etc… But… that’s completely arbitrary, no? Like … to me THAt is the part that needs the most explaining. That someone, somewhere was like ok… A is now the same as the decimal number 65 cause I said so. But! We’re going to write 65 in Hecidecimal (first) as 4E. THEN … we will code the 4E into binary as 1001 I dunno, just skipping that or assuming that that’s somehow normal or logical, when everything else totally is, is weird to me.
@rryan916
@rryan916 Рік тому
@@NesHacker No no it was. I shouldn't even be taking issue really. I just have noticed that people when explaining binary do a nice deep dive on the number part. then usually immediately jump right to letters. As if there is any actual connection between the two. You actually DID explain where the letters can eventually come from. But as I was watching it, in order. It was funny because the same leap RIGHT to letters was made and it made me scratch my head again and go, "why do they always jump right to.... and here is my name in binary." I guess what I usually feel is lacking is the fact that there is absolutely nothing inherent at all about letters in binary. But rather we have to simply decide at one point that some binary number is just going to literally equal a letter. And that's that. The number 36 or whatever, expressed in binary, under a certain context will simply just mean the letter 'M' or something. And I often feel like that concept, that leap, is under explained. You did the best job I've seen so far to be honest. I say this as a smart, yet confused person when it comes to coding etc. and I just get weirdly frustrated when people don't just level with the newly inducted to just say... yeah... we just made this part up. Someone made up a code one time that says the number 396 is now "Q" or whatever.
@angeldude101
@angeldude101 Місяць тому
Mappings of characters to numbers are ultimately arbitrary, but ASCII does have some structure that you can use. If you know it's a letter, then the last 5 digits will be a binary number between 1 and 26, and the whole byte will be the letter with that place in the alphabet with 1 being A and 26₁₀ = 11010₂ being Z. If it's greater than 26 or if it's 0, then it's a symbol of some kind because encoding space was at a premium. Aside from those cases, you can tell if a binary number is a letter by checking if the first 2 bits are 01______, with the first bit immediately after being 0 if the letter is uppercase and 1 if the letter is lowercase. There are other codes like EBCDIC and Unicode, though nobody uses EBCDIC anymore (and one place that did actually got sued for doing so because it couldn't properly spell a client's name), and Unicode is backwards compatible with ASCII, with the first 128 Unicode codepoints exactly matching ASCII. UTF-8 is a mapping between Unicode characters and bytes that is _also_ backwards compatible with ASCII as those first 128 codepoints have the exact same binary representation as they would in ASCII. While ASCII has the aforementioned structure, Unicode gave up and the binary representation of each codepoint has no significance beyond what 16-character block it's in. "Someone made up a code one time" And that someone was the American Standard's Association (now American National Standards Institute) for ASCII, and the Unicode Consortium for Unicode. "I assume then… that there are other codes that use different lettering systems?" Absolutely! ASCII was pretty ubiquitous, so even people with other systems had letters in the same places as ASCII, and nowadays the world has pretty much standardized on Unicode, but those other systems had different mappings for other numbers. Often this meant assigning new letters or symbols to the remaining 128 possible byte values. Which new letters or symbols was never standardized and trying to read text written with one mapping as though it had a different mapping gave a result that has its own word to describe it: "mojibake". Yes, the word is Japanese and the "moji" part is the same as in the word "emoji" and just means "character". There are _many_ symbols used in Japanese text and _many_ different systems that people came up with for encoding them, most of which were incompatible with each other and could be completely unreadable if your devices were from different companies. Thankfully Unicode (and UTF-8) have _mostly_ ended mojibake worldwide, but even _they_ don't have every possible character that someone might want to type and some places can be slow to switch from a prior system.
@lars1588
@lars1588 2 роки тому
4E 69 63 65 76 69 64 65 6F 21
@stevethemagicninja
@stevethemagicninja Рік тому
Nice hoody
@thehollowknerd3858
@thehollowknerd3858 Рік тому
Why say 101 when you can say 5
@rachidbadini7056
@rachidbadini7056 Рік тому
Explaining a 'bit'
@NesHacker
@NesHacker Рік тому
Hue hue hue... I make terrible puns throughout my videos. It is a curse. I cannot escape it.
@bobhardcore6707
@bobhardcore6707 Місяць тому
ten to the power of zero are you kidding me
@NesHacker
@NesHacker Місяць тому
Correct: d0 * 10^0 + d1 * 10^1 + ... It's mathematical formalism to show the pattern, at the end of the day it just represents the "ones" place.
@angeldude101
@angeldude101 Місяць тому
Ironically, it was actually pretty easy for me to read your name in the binary form without converting it to another base. The 010 at the start of each made it clear to me that it was all-caps ASCII. The remaining 5 digits I could map to the fingers on one hand and count through the alphabet starting from A at 1. This let me translate the binary to "RYAN" without needing to look anything up or actually knowing your name beforehand. Convert name into binary or hex? Well in that case, the alphabetic part of my username "angeldude" shouldn't be too hard: a -> 1 -> 00001 n -> 01110 -> 15 (Yes, it was faster for me to count on my fingers in binary, then convert to decimal) g -> 00111 -> 7 e -> 00101 -> 5 l -> 01100 -> 12 d -> 4 -> 00100 (not sure why I remembered the place of d better than e) u -> 10101 -> ? (doesn't actually matter) Prepend 011 for lowercase ASCII for 011_00001 011_01110 011_00111 011_00101 011_01100 011_00100 011_10101 011_00100 011_00101. Change to a less useful grouping so it can be converted to hex and I'm left with 61 6e 67 65 6c 64 75 64 65. The numeric part I _think_ starts with 0011____, but I'm not completely certain. If it is then add 31 30 31.
How To Convert Decimal to Binary
13:24
The Organic Chemistry Tutor
Переглядів 4,3 млн
What exactly is an algorithm? Algorithms explained | BBC Ideas
7:54
Why do programmers use hexadecimal numbers?
8:41
Jacob Sorber
Переглядів 55 тис.
A Video about the Number 10 - Numberphile
10:10
Numberphile
Переглядів 342 тис.
Basics - 6502 Assembly Crash Course 01
12:49
NesHacker
Переглядів 104 тис.
Exploring How Computers Work
18:12
Sebastian Lague
Переглядів 3,3 млн
Binary - The SIMPLEST explanation of Counting and Converting Binary numbers
22:15
Practical Networking
Переглядів 338 тис.
Optimising Code - Computerphile
19:43
Computerphile
Переглядів 135 тис.
NES Graphics Explained
17:23
NesHacker
Переглядів 220 тис.
Read and Write in Hexadecimal, The Easy Way!
6:36
Max's Tech
Переглядів 16 тис.