Why do programmers use hexadecimal numbers?

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ย. 2024

ความคิดเห็น • 150

  • @juicedup14
    @juicedup14 4 ปีที่แล้ว +140

    I love having hex

    • @JoshMadakor
      @JoshMadakor 3 ปีที่แล้ว +22

      How old were you the first time you had hex?

    • @the_allucinator
      @the_allucinator 3 ปีที่แล้ว +12

      I just had hex, and it felt so good.

    • @dxtrs_mnpltr
      @dxtrs_mnpltr 3 ปีที่แล้ว +18

      So hexy

    • @Inoom.
      @Inoom. 3 ปีที่แล้ว

      Can you explain? because 0xdigit equals 0

    • @biblicalangel4914
      @biblicalangel4914 3 ปีที่แล้ว +1

      But can you have hex if you have small chode?

  • @KaspianBerheimBrudin-ny4ge
    @KaspianBerheimBrudin-ny4ge 3 หลายเดือนก่อน +1

    If you channel a 4-bit number through a 4bit decoder and then set the appropiate bits for a 7segment display, you can show a binary number in hex. Super easy to expand.

  • @wojciechjaworski602
    @wojciechjaworski602 4 ปีที่แล้ว +13

    Two 7-segments displays are enough to show the entire byte in hex and value is more readable than 8 LEDs connected to port. Good for debugging purposes in electronics, some motherboards have them to print POST codes

  • @mshingote
    @mshingote 4 ปีที่แล้ว +16

    Your channel has very rich content. The quality of the videos, your presentation skill is really nice.

  • @cellmaker1
    @cellmaker1 3 ปีที่แล้ว +9

    What a clear and very useful explanation of when and why to use Hex! Thanks.

  • @derekkonigsberg2047
    @derekkonigsberg2047 4 ปีที่แล้ว +53

    I have a Computer Science degree and absolutely do know how to use hexadecimal, yet somehow I've never heard the term "hexit" before in my entire life.

    • @krisboultbee1006
      @krisboultbee1006 2 ปีที่แล้ว +1

      Same here. I think the term "nibble" is more common. It's also a pun, which of course programmers love as well. A Nibble is a part of a Byte.

    • @JacobSorber
      @JacobSorber  2 ปีที่แล้ว +3

      Yeah, apparently there are dialects within the CS language. Glad I could expand your vocabulary. 😂

    • @krisboultbee1006
      @krisboultbee1006 2 ปีที่แล้ว +2

      @@JacobSorber That's a good point, even if you didn't really mean it that way (or even if you did). People use different terms for things all the time. So please don't take what I said as dismissal of the term "hexit". It actually makes complete linguistic sense for it to be called that. I've just never come across it.

    • @JacobSorber
      @JacobSorber  2 ปีที่แล้ว +1

      ​@@krisboultbee1006 No worries. Your comment didn't sound dismissive to me, at all.

    • @camm409
      @camm409 ปีที่แล้ว

      I had never heard that term either but it made complete sense to me, I might rob the usage of that term to explain it to others.

  • @user-rx4gw7gz9m
    @user-rx4gw7gz9m 4 หลายเดือนก่อน

    Taking David Bombal's CCNA course and this just helped me greatly. Much simpler explanation and now converting to binary is easy, thanks !

  • @Jenny_Digital
    @Jenny_Digital 2 ปีที่แล้ว +1

    I’ve been familiar with and using hex numbers since 1982-3 when dad bought us a ‘family’ home computer. It was an Acorn Electron with a built in assembler and I wore my first code on it. Sweet times!
    Seriously though, hex numbers are useful and make things easier _some_ of the time. Didn’t find it funny however when reading a datasheet for an old GI part, they used a few octal numbers without telling me they were such. Took me ages to realise what was wrong.

    • @JacobSorber
      @JacobSorber  2 ปีที่แล้ว

      Yeah, that's pretty mean.

  • @jimnoeth3040
    @jimnoeth3040 ปีที่แล้ว

    Great job explaining hex and why to use it. The first mainframe I programmed on was a GE 6000 series that had a 36 bit word (IBM used 36 bit words in their early computers too). The words were divided into upper and lower of 18 bits each. Base 8 or octal worked well in that case, so I got used to octal (or rectal as we sometimes referred to it) to represent the 18 and 36 bit values. Just a piece of history.

  • @MickZeller
    @MickZeller 4 ปีที่แล้ว +4

    I'm digging the goatee look! Great video, as usual, thanks for putting it together!

  • @johnjackson3483
    @johnjackson3483 2 ปีที่แล้ว

    Sir(the respectful part) One place you will find binary in code is Ben Eater’s video on sending commands to an LCD display in C code to set register commands to set all pins to output. He says “I could use oXFF but so you can visualize it I’ll use %”11111111” to set all pins to input.
    Enjoying your videos.

  • @ColinBroderickMaths
    @ColinBroderickMaths ปีที่แล้ว +1

    I get alone fine with hex but I often prefer the binary notation (like 0b01101001) for masks because I can immediately tell which bits are affected with exactly zero thought. That notation is now standard in both C and C++, I believe. Naturally if you're dealing with 32-bit masks, or something large like that, it becomes a lot less convenient!

  • @thomasmurphy4640
    @thomasmurphy4640 4 ปีที่แล้ว +1

    Great timing for this video. I just start programming with hexadecimal numbers at my job.

  • @Maha_s1999
    @Maha_s1999 ปีที่แล้ว

    Fantastic summary! Hexadecimal numbers here I come, thanks for the heads up Jason!!

  • @Jenny_Digital
    @Jenny_Digital 2 ปีที่แล้ว

    Also, having heard you mention not seeing all that much binary in code, I found it much more useful when going straight to the metal back in the day than now. Somehow it made more sense with some registers and whatnot in 6502 and back then. Thank goodness for good compilers now though!

  • @Rakusan2
    @Rakusan2 2 ปีที่แล้ว +1

    When I was learning C, I already knew hex from languages I learned before and so it did not bother me.
    On the other hand, octal did. It was mainly because I had never seen it before and at first look, I thought it was hex.

  • @ABaumstumpf
    @ABaumstumpf 4 ปีที่แล้ว

    Reminds me of a bug that took me ages to find and fix.
    For printing documents the event has a field for the document-type - so far so easy. That field is a hand written bit-set (well, mostly typedef and several defines and macros.... no, this is C++14,,,, ) but ok, and the mask for that was from an enum. And there in lied the problem - the enum was written with decimal numbers (of course partially from other defines and enums again) and somebody added a new document-type but just gave it another new integer - not a power of 2. And to make matters worse the function that mapped a given document-type-field to the actual documents was not a simple lookup but had an internal state and, given the same document-type-field again, returns the NEXT BIT that is set - a relic from when the bit-field was used for other things.
    So as long as you had only power-of-2 numbers it worked, if you had a number like 66 then the first time you checked it would give you the document corresponding to the enum for 64 and the second time it would be 2......................... which meant that when you tried to compare a document-type to it self it could return not-equal because of that -.-

  • @amirvejahat9566
    @amirvejahat9566 4 หลายเดือนก่อน

    Great explanation!

  • @odpisani981
    @odpisani981 4 ปีที่แล้ว +2

    Great video as always! Thanks for sharing your knowledge with us. :)

  • @mnoxman
    @mnoxman ปีที่แล้ว

    Before the 80s Octal was quite popular too and going back even further BCD.

  • @tymothylim6550
    @tymothylim6550 2 ปีที่แล้ว

    Thank you Jacob for this video. Helps clarify things for me :)

  • @anandjoshua4711
    @anandjoshua4711 11 หลายเดือนก่อน

    Very useful video, I wish I had come across this sooner.

  • @JoePescisAngryCousin
    @JoePescisAngryCousin ปีที่แล้ว

    This video was great. Thank you.

  • @cybercrimeconsultant
    @cybercrimeconsultant 2 ปีที่แล้ว

    Nice discussion on HEX.

  • @chef1arjunaidi
    @chef1arjunaidi 3 ปีที่แล้ว +1

    I am surprised you did not mention the HP 16C computer scientist calculator which makes base number calculations a breeze. Sadly, it is no longer in production. However, a Swiss company SwissMicros have produced DM-16, a clone of the venerable HP 16C

  • @rustycherkas8229
    @rustycherkas8229 2 ปีที่แล้ว

    @07:15 "Favourite uses for hex?"
    Sending messages to NASA if/when I'm ever marooned on Mars... 👽
    🤣🤣🤣🤣🤣

  • @lewiscole5193
    @lewiscole5193 4 ปีที่แล้ว +2

    IMHO, you should use hex if that's what the convention(s) is/are for the programming environment you are working in.
    In today's world, that means you will usually use hex (or decimal or occasionally binary).
    But if you're an old timer like me who used to work on a 36-bit machine with 6-bit, 9-bit, 12-bit, or 18-bit subunits where it was convention to deal with 3-bit groups, then you will usually use octal (or binary or occasionally binary).
    IOW, find out what the conventions are and stick to them, not use hex if you can't use binary or decimal.

  • @user-sb3vh6by7e
    @user-sb3vh6by7e 4 ปีที่แล้ว +2

    I'm familiar with hex, but I haven't understood something yet. Why does the 0* exist? For ex: 0*F63A. Why don't we just write F63A?

    • @homelessrobot
      @homelessrobot 3 ปีที่แล้ว +4

      the 0x or 0h convention is to make distinguishing numbers from other symbols easier; if a token starts with a digit; the token represents some kind of number. Otherwise you have to do more complex parsing to even identify what the role of a symbol is. And the x is used two distinguish between overlapping numerical representations: 0123; is it decimal? Is it octal? Is it hex? You cannot tell just by looking at it. All of those digits are valid in all three representations.

    • @rustycherkas8229
      @rustycherkas8229 2 ปีที่แล้ว +2

      Consider how the parser deals with sequential characters in a C source file.
      An alphabetic character suggests a symbol is starting.
      (Eg: in "xyz = 5;" the 'xyz' is a variable name starting with letter 'x'.)
      A leading digit means that what follows is a number.
      (Eg: "x = 3.14159;" the '3' triggers interpretation as a value.)
      27 or 345 or 1024 would each be recognised as decimal integer values.
      Long ago, octal was more popular, and a leading 0 meant the value was octal, not decimal.
      (UNIX & C were developed on DEC PDP computers whose internals and machine code instruction set 'fit' with octal numbering.)
      077(base 8) is the octal representation of 63(base 10). As Hex, that would be 0x3F(base 16).
      To 'extend' C, the leading 0 has been retained to indicate "non-decimal number",
      and 'x' was added as 2nd char to indicate "this is hexadecimal, not octal".
      As to your F63A??? Consider: if( R2D2 < C3P0 )... Your 'F63A' is a valid name (token) for a variable (or a function)... How should the compiler distinguish you mean it to be a number?
      (Yes, R, P and O are not hex digits... cut me some slack, please!)
      const int F63A = 0xF63A; 🤣🤣

  • @unclerojelio6320
    @unclerojelio6320 3 ปีที่แล้ว +1

    Hexits? I’ve been a programming since the 80’s and that’s a new one on me.

  • @leonardoestacio5437
    @leonardoestacio5437 2 ปีที่แล้ว

    How rare though, when I first met hex I fell in love with it, I like it even more than the decimal base, and I code as hobby, am I some type of nerd?

  • @komodot9249
    @komodot9249 4 ปีที่แล้ว +1

    I might have missed it ,but I think you forgot to mention big edian vs little edian. That can be really confusing when trying to read data from a binary file when you already know hex.

    • @davidolsen1222
      @davidolsen1222 2 ปีที่แล้ว

      And the endian nature matters a lot. Such that where the individual bytes and sometimes octets end is absolutely critical to understanding the data. A thing that gets much harder to understand if we don't have those boundaries marked by using hex.

  • @wandersgion4989
    @wandersgion4989 3 ปีที่แล้ว +1

    Anybody ever watch the CGI animated kid's show, Reboot?
    There's this cool villain in it named Hexadecimal.
    I guess she must have been really good at counting to 16.
    I think that show deserves a reboot. 😉

  • @ziat1988
    @ziat1988 2 ปีที่แล้ว

    I don't understand why there's the x in 0x16D? Only letters from A to F are accepted right?

  • @lylewyant3356
    @lylewyant3356 4 ปีที่แล้ว +1

    Been a long time since I've studied hex or octal

  • @askr7512
    @askr7512 4 ปีที่แล้ว

    Can you please do a video on after effects in embedded field like losses in market, what new we can expect ... etc etc due to corona lockdown on earth...

  • @gabe9250
    @gabe9250 3 ปีที่แล้ว

    Now I know how to turn hexadecimal to decimal in my head faster, I know that’s not the purpose of the video but thanks anyway 🙏!

  • @jiechen1374
    @jiechen1374 2 ปีที่แล้ว

    3:55 Hex over binary ; 4:30 another advantage

  • @ancatarca8047
    @ancatarca8047 3 ปีที่แล้ว

    love your videos , this was very helpful

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว

      Thanks, Anca. Glad I could help.

  • @chiragjethava1186
    @chiragjethava1186 4 ปีที่แล้ว +1

    Can you make a video on thread pool explanation using pthread ?

    • @JacobSorber
      @JacobSorber  4 ปีที่แล้ว

      Check out my multithreaded server videos. One of them has a thread pool.

  • @igwanwan_dagoat1523
    @igwanwan_dagoat1523 ปีที่แล้ว

    So when you use numbers such as 26 you use more data in the computer?

  • @44r0n-9
    @44r0n-9 4 ปีที่แล้ว

    I love your videos so much.

  • @edgeeffect
    @edgeeffect 2 ปีที่แล้ว

    DEAD BEEF....
    That one of the places Unix and it's friends show their age.... Hex seemed to "win" against Octal sometime around 1980s but Unix still uses Octal in quite a few places.

  • @PkMath-e1v
    @PkMath-e1v 3 ปีที่แล้ว +1

    I love hex

  • @PartheevVideoClub
    @PartheevVideoClub 3 ปีที่แล้ว

    Make a video on Octal decimal

  • @tahmiddaniel9241
    @tahmiddaniel9241 3 ปีที่แล้ว

    I liked your video very much. I learnt a lot about the conversation of numbers. Thanks.
    But I have a query that (365)2 = (11110101)2 is this correct? Did I make a mistake? Please help me to figure out what error occurred?
    Advance thanks again.

    • @TomStorey96
      @TomStorey96 3 ปีที่แล้ว +2

      If you've done what I think you did, you don't encode each decimal number as it's own string of binary digits and then concatenate them.
      The binary representation indicates which powers of two add up to make the number.
      365(10) = 101101101(2)
      Or
      256+64+32+8+4+1

  • @scottbaldy8956
    @scottbaldy8956 2 ปีที่แล้ว

    At 3:48 you imply that 45004503 (base 10) = 11010101110101101101101011 (Binary). This is incorrect. The binary number shown equates to 56056683.

  • @sayanghosh6996
    @sayanghosh6996 3 ปีที่แล้ว +1

    2:00 this? what this? where ?

  • @NimaqAlizadeh
    @NimaqAlizadeh 2 หลายเดือนก่อน

    Nice 🎉

  • @thomascotton2834
    @thomascotton2834 ปีที่แล้ว

    Never heard of this hexit thing, 5A is one hexidecimal byte, 5A 4C is two hexidecimal bytes also known as a short or a word, the byte has two hexidecimal symbols (0 to F) a byte is 8 bit, a nibble is 4 bit, a short or a word is 2 bytes, also known as 16 bits... Never heard or seen the use of the word hexit, which is just one byte represented in hexidecimal, its not a hexit, its one byte which is 8 bit, 00 to ff.. people just call these bytes usually, not hexits.
    hexit just sounds like some odd conversion tool, id rather just call one byte.. one byte.
    if theres a community of people using the word hexit instead of byte, i mean no offense, but to me it just looks like one byte of data represented in hexidecimal, people usually just call this a byte, or bytes.
    "Heres 4 bytes in hexidecimal 5A C3 7B D4"

  • @leonardesser5802
    @leonardesser5802 4 ปีที่แล้ว

    Thank you, J :-)

  • @MaheshKumar-lq1xm
    @MaheshKumar-lq1xm 4 ปีที่แล้ว

    Can you please upload your consciousness ?
    I can download it for my project...
    Your C videos are my only hope.
    I have double masters in computer science but still I learn something in every video of yours...👍

  • @theinvertedworld.
    @theinvertedworld. หลายเดือนก่อน

    for those new to number systems : what happens in hexadecimal, stays in hexadecimals

  • @oluwatobioyinlola
    @oluwatobioyinlola 4 ปีที่แล้ว

    const unit32_t = 0x47F12000; Amazing Prof! :)

  • @Sollace
    @Sollace ปีที่แล้ว

    0xBEEF is underappreciated, ngl

  • @olealgoritme6774
    @olealgoritme6774 4 ปีที่แล้ว +3

    Nibble = half a byte
    Half a byte = 4 bits
    8 bits = 1 byte

  • @TarousDT
    @TarousDT 2 ปีที่แล้ว

    I only see binary in code when there are bit flags, but honestly I don't see hex very often. TO BE FAIR, I don't look at a lot of other people's code, so mostly I just don't use hex xD

  • @Tyrope
    @Tyrope 3 ปีที่แล้ว

    5:12 "imagine if we were to write this in decimal", you mean.. like this? rgb(255, 170, 84)?

    • @homelessrobot
      @homelessrobot 3 ปีที่แล้ว

      thats representing the components as decimal, not the entire computed value. the entire computed value is 255*(2^16) + (170*(2^8)) + 84, or 16755284. You are not just going to be able to eyeball the components out of a number like that. You /could/ displace the components with a power of 10, but now you've made actually computing the color 10 times more difficult for your computer, and also you are wasting a bunch of padding bits
      This stuff is mostly important at a lower level than even 99% of programmers regularly operate at anymore, like where things like colors and text and data structures are actually just machine numbers with a thin venere of representative symbols.

  • @AnilKumar-hp1qg
    @AnilKumar-hp1qg 4 ปีที่แล้ว +2

    Binary is like Traditional Chinese. Hexadecimal is Simplified Chinese, still is excruciatingly difficult to learn.

  • @justcurious1940
    @justcurious1940 2 ปีที่แล้ว

    to convert from binary to decimal u multiply each digit with powers of 2 and then u add them together but from binary to hexa u group every 4 bits then u convert them to get 1 hexa digit
    i know 1 hexa digit can represent what a 4bits can represent but what does not make sense is the way how we convert binary to decimal why we use all bits together and then we add the result of the multiplication of all digits with the powers of 2 why does it work this way ?????????? is base10 an unique base or what ??? please i cant sleep because of this i feel i'm missing something

    • @JacobSorber
      @JacobSorber  2 ปีที่แล้ว +1

      No there's nothing special about base 10. Base 16 is special because it's a power of 2. That's why you can take bits in bundles. So, base 4 and base 8 and base 32 would all have that property. But converting from base 2 to base 5 or base 3 you would end up doing what you're doing with base 2-> base 10.

    • @justcurious1940
      @justcurious1940 2 ปีที่แล้ว

      @@JacobSorber thank you for answering
      i'm trying my best to not be a heavy student here
      conversions from :
      base 2 -> base 8
      base 2 -> base 16
      base 2 -> base 32
      is very clear to me
      and also the steps we tak for these conversions make sense
      what is not clear is conversions from :
      base 10 -> base 2
      base 10 -> base 16
      base 10 -> base 3
      base 10 -> base x
      the steps u take to convert base 10 to any other base is the same u only have to change the base value for the target base
      which mean we can convert base 10 to any other base but
      we canot for example convert base 2 to base 3 or base 2 to base 5 directly right ?
      or even convert from hexadecimal to octal directly right ?
      which mean base 10 is the only base that we can convert any other base to it right ?
      like u said base 8 and base 16 are specials for base 2
      but what about base 10 on general why is it the only base that we can convert any other base to it ?

    • @JacobSorber
      @JacobSorber  2 ปีที่แล้ว +1

      You can convert any base to any other base. We just use base 10 because it's our societal default-it's what we're used to.
      For example, say I want to convert from base 2 to base 5.
      Consider the base-2 representation 011010
      Normally, we talk about the base-2 places as 1, 2, 4, 8, 16, 32, 64 ...
      In base 5, they would be 1, 2, 4, 13, 31, 122, 224
      So, in base 5, that number would be 2 + 13 + 31 = 101
      But, we usually mentally use base 10 as our internal "native" number format. So, people usually convert to base 10 as an intermediate step. But, you definitely don't have to.

    • @justcurious1940
      @justcurious1940 2 ปีที่แล้ว

      @@JacobSorber thank you so much brother i did play with base 5 a little bit i'm not gonna lie it was
      tricky with addition and multiplication but i did convert
      base 2 to base 5 using 1,2,4,13,31,112,224 as a place values
      and also i managed to convert binary to hexadecimal without grouping digits
      by using 1,2,4,8,10,20,40,80 instead of using place values in base 10 (hopefully i'm correct in this explanation )
      thank u so much i really couldn't get over it in the past few days to a point i started thinking why do
      we have 10 fingers ? is it related to the 10 digits that we have in base 10 hhhhhhhhh

  • @user-te2gb1hy9y
    @user-te2gb1hy9y 2 ปีที่แล้ว

    I like how HEX is, on average, shorter to write. In DEC, from 100 to 255, everything in HEX is still only 2 characters while DEC is 3 now.

    • @ninesquared81
      @ninesquared81 ปีที่แล้ว

      In general, a larger base admits a shorter representation of some given number than a smaller base.
      More precisely, with N(b,k) as the number of base-b digits needed to represent an integer k, if m > n, then N(m,k) ≤ N(n,k) for integers n, m, k; n, m > 1.

  • @danieleccleston7928
    @danieleccleston7928 4 ปีที่แล้ว

    Jacob Sorber: Why are you Running!?

  • @eidiazcas
    @eidiazcas 4 ปีที่แล้ว +1

    But what does the 0x mean?

    • @RubiksSolver25
      @RubiksSolver25 4 ปีที่แล้ว +2

      eidiazcas it’s a prefix that indicates the number is in hexadecimal form

    • @JacobSorber
      @JacobSorber  4 ปีที่แล้ว +2

      Yeah, what RubiksSolver25 said (thanks). Otherwise, when you see a number like 101, you wouldn't know if it's decimal or hex.

    • @eidiazcas
      @eidiazcas 4 ปีที่แล้ว

      Thanks

    • @homelessrobot
      @homelessrobot 3 ปีที่แล้ว

      the leading zero tells the lexer that its a number, as opposed to an identifier with a cool name like FAAB, and the x tells it to interpret it in hex, because numbers like 465 can represent hex, or octal or decimal, but mean different things in each.

    • @rustycherkas8229
      @rustycherkas8229 2 ปีที่แล้ว

      @@JacobSorber 101??? Could be binary, octal, decimal or hex! 😂

  • @janjoska2549
    @janjoska2549 3 ปีที่แล้ว

    bakcground-color: rgb(255,0,0)

  • @69k_gold
    @69k_gold ปีที่แล้ว

    Hex in itself isn't a problem, it's when some insane people write hex numbers in odd number of digits it becomes confusing

  • @islandcave8738
    @islandcave8738 3 ปีที่แล้ว

    0x45

  • @HaouDeSoul
    @HaouDeSoul 4 ปีที่แล้ว +3

    0xDEAD

  • @skybyte4me
    @skybyte4me ปีที่แล้ว

    0:20 I use universal translator btw 🤣

  • @andydelle4509
    @andydelle4509 4 ปีที่แล้ว

    What did you miss? I'll tell you - The dreaded DEC OCTAL base 8 system!

    • @JacobSorber
      @JacobSorber  4 ปีที่แล้ว

      I'll let you make that one, ok? 😀

  • @jacko314
    @jacko314 ปีที่แล้ว

    missed: negative numbers in hex.

  • @ishaktobbi4860
    @ishaktobbi4860 5 หลายเดือนก่อน

    i am not saying that the video is bad , but the amount of information compared to the time consumed is not much

  • @subsidizer292
    @subsidizer292 2 ปีที่แล้ว +1

    Here's an old hexadecimal-based geek joke.
    Q: "To be or not to be?"
    A: "FF"
    😁

    • @rustycherkas8229
      @rustycherkas8229 2 ปีที่แล้ว

      printf( "The answer is %d
      ", ( 'T' + 'o' + 'B' + 'e' ) & 0x1F );🤣

  • @dara_1989
    @dara_1989 11 หลายเดือนก่อน

    writing hexa numbers is easy ... but reading them is difficult , impossible

  • @carbon3549
    @carbon3549 2 ปีที่แล้ว

    To be honest, I prefer binary representation over hexadecimal representation

  • @somuchinfo4879
    @somuchinfo4879 4 ปีที่แล้ว

    4:00

  • @Supaship6000
    @Supaship6000 4 ปีที่แล้ว

    0xBEEF :D

  • @jamesbeatty-wilson5290
    @jamesbeatty-wilson5290 ปีที่แล้ว

    Because tostadas were obsolete

  • @ckacquah
    @ckacquah 4 ปีที่แล้ว +1

    0xDEADBEEF

  • @Mintymenty
    @Mintymenty ปีที่แล้ว

    So basically im a programmer now?

  • @kraftwerk974
    @kraftwerk974 4 ปีที่แล้ว +1

    Let me summarise: $FFFFFF is more convenient than %111111111111111111111111 in your code. Isn't it ?

    • @JohnMarkIsaacMadison
      @JohnMarkIsaacMadison 4 ปีที่แล้ว +2

      Sometimes binary literals are a bit easier to read than hex for bit flags.

    • @JacobSorber
      @JacobSorber  4 ปีที่แล้ว

      Hex is more compact. Readability and convenience depend on what you're doing. But, yeah, binary literals get big fast.

    • @kraftwerk974
      @kraftwerk974 4 ปีที่แล้ว

      @@JacobSorber actually in my beloved 6510 I never need going beyond $FF for opcodes and $FFFF for addresses for obvious reasons but it's true that for bit instructions I tend to use binary for clarity. BRK.

    • @lewiscole5193
      @lewiscole5193 4 ปีที่แล้ว

      So is 07777777 (octal) now that you mention it, and it's more "convenient" to use if you're programming on a 36-bit machine.

  • @antutucat8231
    @antutucat8231 4 ปีที่แล้ว

    8 bits=1 byte
    4 bits=1 hexa
    1 byte= 2 hexa

    • @syamimnijam4586
      @syamimnijam4586 4 ปีที่แล้ว

      Nibble is a funnier word

    • @homelessrobot
      @homelessrobot 3 ปีที่แล้ว

      this is also mixing metaphors; hexa is a description of the visual representation, not the size of the number being represented.

  • @coshvjicujmlqef6047
    @coshvjicujmlqef6047 4 ปีที่แล้ว +1

    Stop representing other people. I am a programmer and I do not use hexadecimal. And I would argue hex is generally just a horrible disaster. Hex floating-point formatting algorithm is a fucking disaster.
    Formatting them or parsing them is not as fast as formatting decimal digits.

    • @justshinigami9364
      @justshinigami9364 2 ปีที่แล้ว

      Exceptions make the rule. nobody says hexadecimals have to be used everywhere. but there are many cases where it actually is easier to use hex instead of dec. sometimes its just preference. like bitfields saved as integer: i write them out in binary so i always can look up the bits that are set by me;

  • @jamesbeatty-wilson5290
    @jamesbeatty-wilson5290 ปีที่แล้ว

    Zoog zomg

  • @maaahakalgupta4317
    @maaahakalgupta4317 2 ปีที่แล้ว

    #

  • @justink7269
    @justink7269 2 ปีที่แล้ว

    I dont think this is a good explanation.

  • @chesshooligan1282
    @chesshooligan1282 4 ปีที่แล้ว

    This video could have been 2-minutes long, perhaps even 1-minute.

    • @homelessrobot
      @homelessrobot 3 ปีที่แล้ว

      Maybe you should make your own 1 minute video on the topic then and save people some time? Or maybe don't look a gift horse in the mouth.