Big Endian And Little Endian

Поделиться
HTML-код
  • Опубликовано: 13 янв 2025

Комментарии • 60

  • @vishnupv2008
    @vishnupv2008 4 года назад +3

    Your program is correct. But the explanation at the end is confusing. The pointer doesn't store the value. It only stores the address of the value. In a 32 bit system, address is 4 Bytes. That is why we use always "int" to store pointer. Because it is also 4 bytes. However, when you store address of your data in a character byte, you get one byte of address.

  • @yoavmor9002
    @yoavmor9002 Год назад

    In Little Endian, the least significant bit will also have the smallest address.
    In BE, when drawing memory as a strip with lower addresses on the left, the bits will be written in the same order as they will be written in math.

  • @chandramohanbs298
    @chandramohanbs298 5 лет назад +3

    Thank you. Now I understood. Character pointer typecast!

  • @samratsuklabaidya5324
    @samratsuklabaidya5324 3 года назад

    How deeply computer scientists have worked on this....Awesome

  • @308_akashsharma2
    @308_akashsharma2 3 года назад +1

    thank you sir, nice approach to solve this problem,

  • @exoticcoder5365
    @exoticcoder5365 3 года назад +1

    Thank you sir with exact code !

    • @CppNuts
      @CppNuts  3 года назад

      Glad it helped

  • @kunalprasad722
    @kunalprasad722 4 года назад +2

    can you please make a video on how decimal(float,double) value get stored?I mean i want to how much bits/bytes is been assigned for digit before decimal and how much is assigned for the digit after decimal.It will be really grateful.

  • @ahmedrahmane9972
    @ahmedrahmane9972 6 лет назад +1

    Good bro. Yes that was an architecture philosophy: "Endianess". First UNIX OS when installed on a different endianess CPU it has been shown: NUXI. that is NUXI Problem. so a conversion to Network order is required before transferring data on network. NBO Network Byte Order. which is in Big Endian. so if the CPU is Big Endian then transfer data and don't convert otherwise is in L.E then convert first then transfer.

  • @bluehornet6752
    @bluehornet6752 7 лет назад +10

    Nice video. Too bad your example integer value wasn't 0x76543210 though, as it would have made it easier to relate the lower-order bytes to the lower-order memory addresses (and vice versa).
    Those are derived from the novel *Gulliver's Travels* by the way, but you're correct about it having to do with which end of a (boiled) egg is broken (ie; big end vs little end). The characters in the novel who break eggs on the little end lived in one island nation (Lilliput), but others who broke a boiled egg on the big end lived on a different island (Blefuscu). I'm not sure where people lived if they broke boiled eggs in the middle...

    • @CppNuts
      @CppNuts  7 лет назад +2

      +Tom B Waooo you reminded this story again, and when i heard this first time i also thought same thing as you did about middle once :D.

    • @bluehornet6752
      @bluehornet6752 7 лет назад +1

      In all honesty, I never read the novel. When I was in Computer Science school and we got into Endianness, I did go an read the parts of the book applicable to the concepts of Little and Big Endian--but overall I think the book is a bit strange. LOL...

  • @ganeshiitr-cse6328
    @ganeshiitr-cse6328 7 лет назад +2

    thanks a lot .... your videos are awesome ... keep going on more c++ related videos ...... suggestion u can create separate playlist for c++ 11 c++14 features ...........

    • @CppNuts
      @CppNuts  7 лет назад +1

      +Ganesh IITR-CSE Thanks for your feedback dude.
      These playlist are my future plans.

  • @anushkagupta8387
    @anushkagupta8387 4 года назад

    Very nicely explained

  • @LeelaseshuKumar
    @LeelaseshuKumar 5 лет назад

    For LE data has stored in reverse order , what about BIT order: Ex : we want store 01 -> in BE 0000 0001 at ram staring position, similarly in LE also 0000 0001 like this at back end in ram..

  • @senthilandavanpalani7294
    @senthilandavanpalani7294 5 лет назад +1

    Thanks for the explanation.

    • @CppNuts
      @CppNuts  5 лет назад

      You are welcome dude..

  • @mswati2855
    @mswati2855 2 года назад

    Very well explained

  • @sasmitarout4681
    @sasmitarout4681 4 года назад

    Nicely explained

  • @aryankhandelwal37
    @aryankhandelwal37 4 года назад

    I think computer stores in form of binary and you using hexadecimal in example can just confuse someone like after watching your video for a minute I was thinking that 1byte=2digits 4byte=8digits then why limit for integer is 2^32 , after a minute of thinking I got that you should have taught by storing number binary instead it could have avoided these small confusions

  • @usmansadiq2014
    @usmansadiq2014 4 года назад

    Love you. Very Well Explained.

    • @CppNuts
      @CppNuts  4 года назад +1

      Glad it was helpful!

  • @srivanikothavadla4606
    @srivanikothavadla4606 4 года назад

    Very well explained and end of the vedio you drawn a little doll I love it

  • @abhishekjaiswal6492
    @abhishekjaiswal6492 4 года назад

    How does machine/compiler reads character in the case of big endian, you elborated about the little endian that how compiler reads the bits.. But Pls tell me how bits are read in the case of big endian??

  • @trident8638
    @trident8638 6 лет назад +2

    So as you took char pointer I got one question will char a='0' is false or int a=0 is false? as ascii value is 48

    • @trident8638
      @trident8638 6 лет назад

      my question may be illogical, but still :)

    • @CppNuts
      @CppNuts  6 лет назад +2

      Saurabh, int a=0 is false, because if you will compare it like if(a==false) then it will be false because a is holding zero. But in another case char a='0', as you said it's ascii is 48 then it wont work here, i mean if you will write something like this if(a==false) then compiler will replace this code like if(48==false) and answer for this would be not true.

  • @401-Unauthorized-u5b
    @401-Unauthorized-u5b 6 лет назад

    Great video! Thanks!

  • @mani0536
    @mani0536 6 лет назад +1

    Thank you so much

    • @CppNuts
      @CppNuts  6 лет назад

      Appreciate it!!

  • @tarunachaudhary2914
    @tarunachaudhary2914 5 лет назад +1

    But char pointer takes 8 bytes. Infact every pointer is in c is 8 bytes if you are using 64 bit system.

    • @CppNuts
      @CppNuts  5 лет назад

      Correct!!

    • @onlyparadise
      @onlyparadise 5 лет назад +1

      The pointer itself takes 8 bytes in 64 bit system memory but it will only point to a single byte...

  • @KaramAbuGhalieh
    @KaramAbuGhalieh 4 года назад

    I am trying to print *c but it always shows a question mark,

  • @bramu2671
    @bramu2671 5 лет назад +1

    Hi if there is difference between little Endian and big endian then why both exits

    • @CppNuts
      @CppNuts  5 лет назад

      Yes both are different and both exist.
      Plz watch again for better understanding.

  • @keyogen
    @keyogen 3 года назад

    15sec in "First of all it spelled Endian not Indian." Me who found this video using Indian. That's why i had hard time look it up. Thanks from the informative video.

  • @karun4663
    @karun4663 5 лет назад +1

    why we wre typcasting to char* ?

    • @CppNuts
      @CppNuts  5 лет назад +1

      If there is some data of some Data Type and we want to access that data Byte By Byte then we cast it in char *, let me know if you need more clarification.

  • @a_storyy_teller
    @a_storyy_teller 3 года назад

    nicely explain

  • @ruchirmehta
    @ruchirmehta 4 года назад

    But why such confusion was created in the first place??

  • @bramu2671
    @bramu2671 5 лет назад

    If no difference between both then it's better it should be one

  • @sabyasachisahoo8091
    @sabyasachisahoo8091 4 года назад

    1byte ya 1bit plz confirm..........

  • @BeeBN
    @BeeBN 6 лет назад +2

    thanks for the program, I'm going to use it to convert heihachis soul calibur II moveset to work on gamecube

  • @bostonlights2749
    @bostonlights2749 4 года назад

    Good explanation...bad egg drawing

    • @CppNuts
      @CppNuts  4 года назад

      Sorry for that, i have good equipment's now.

  • @haphapablap9273
    @haphapablap9273 3 года назад

    Actually its Endian not Endin

  • @snehashetty5504
    @snehashetty5504 4 года назад

    🔥

  • @Domenic367
    @Domenic367 3 года назад

    big indian

  • @mukul2451
    @mukul2451 3 года назад

    Indians ko Endians bolta hai gaddaar 🤬🤬

  • @anubhavseet004
    @anubhavseet004 2 года назад

    Tum khud ka doubt clear kro pehle.