Bit Rotation and Shifting: Simple Explanation!

Поділитися
Вставка
  • Опубліковано 2 гру 2024

КОМЕНТАРІ • 28

  • @simonmax3901
    @simonmax3901 4 роки тому +3

    That was great....... especially shifting for integer values.
    That was very new to me

  • @skilz8098
    @skilz8098 Рік тому

    Very nice and clear example of bit shifting. Your video demonstration and simplicity is spot on especially for beginners. For me this video was just a really good refresher while already being familiar with them and their differences from working within the C/C++ languages. From a programming perspective they're easy to understand and use and I know most of their basic uses yet I would find it very useful to have a solid explanation of how they're used within Assembly.
    As for their use within Assembly, I'm not referring to just their use from a programming perspective of using assembly to write programs but more on the lines of how they are used within the design of an assembler and its instruction set architecture.
    Let's consider already having them implemented in the hardware as physical components within an ALU that can be invoked from OPCodes - Assembly Mnemonics - instructions. At this stage of the game everything is relatively good and straightforward.
    Now having their functionality and being able to use them within the architecture is one thing, but knowing what their main purposes are or more to the lines of when they are needed and why, when and how you should use them is closer to the point.
    For example, I can call them through existing opcodes within a simple 8-bit architect. The current implementation of the architect is taking 4 8-bit or words from each instruction cycle. The first byte is the OPCODE or Instruction, the 2 and 3rd bytes are two source lines that are fed to the registers, as well as other hardware devices such as the ALU, RAM, the Stack and I/O as input A and B, being SRC1, SRC2 respectively and the 4th byte is the destination DEST respectively.
    I currently have the Stack Working and I'm in the process of implementing the "call" and "ret" instructions within the assembler to use the stack to push and pop addresses for procedure - subroutine calls. Implementing this shouldn't be to difficult as it's a simple stack frame.
    However, having a good clean and clear explanation of what their main uses are at the ISA - to Assembly stage would be very beneficial and useful information just to add another tool into the toolbox. Something to this effect could make for a good video resource.

  • @messizqin9603
    @messizqin9603 4 роки тому +1

    That's clean and easy to understand. Spot on.

  • @saeed2tube
    @saeed2tube 4 роки тому +1

    Its usefull to turm on something one after one by adressing output as qw with just one block. Thanks for continuance effort.🙏

  • @Vozzhd
    @Vozzhd 4 роки тому +1

    Thank you))) perfect video. 3k people already subscribe, congratulations!! Waiting for TIA Thursday))

  • @framos9991
    @framos9991 Рік тому

    Thank you! Best video!

  • @dukenuke2690
    @dukenuke2690 4 роки тому +5

    and btw shifting Left by 1 position equals multiplying the value by 2 :D

  • @muhammadferdiansyah2473
    @muhammadferdiansyah2473 Рік тому

    Excelent explanation! Thankyou Sir!

  • @FraztheWizard
    @FraztheWizard 2 роки тому

    Great explanation! Thanks!

  • @ndongminkolandry4443
    @ndongminkolandry4443 4 роки тому

    Hi I do appreciate and like what you do. You help me with my Tia programming but I would like to know if you also do video on scada

  • @prabhjotsingh6731
    @prabhjotsingh6731 4 роки тому

    thank you..very good explanations

  • @patilprashanth1
    @patilprashanth1 4 роки тому +2

    good explanation....practicle example wound have been more efficient.

  • @mahdidavari8094
    @mahdidavari8094 Рік тому

    Thanks

  • @danieltrigo2928
    @danieltrigo2928 Місяць тому

    Why do we need to shift to the left the bits? what is the purpose on this?

  • @Motoko-en3kd
    @Motoko-en3kd 2 роки тому

    hi hegamurl. i'm reading some cpu arch doc. i'm beginner of Assembly Language. when i saw the rotate right operation, i can't think of any use for it, i google it , but only found how to implement it in high level language. it's there have secret between native system internal and bit rotate operation. I hope you can help me get some prompt information(🙇‍thanks).

  • @johanneskampfl6794
    @johanneskampfl6794 2 роки тому

    Best!

  • @simonmax3901
    @simonmax3901 4 роки тому

    In the future videos please assist in loop(LOOP) program and jump to label instruction(JL).
    Thanks in advance

  • @lordcuc1
    @lordcuc1 4 роки тому

    Good work,thanks for you videos.I had a question for you. I had S300 system,TIA 14,WinCC Advanced,and want 16 separate bits(discrete input signals) convert to Word format in DB. Please help me with this problem.Thank you.

  • @mlikiachref5228
    @mlikiachref5228 4 роки тому

    could you make a video about safety Plc

  • @muhammadkhalid8374
    @muhammadkhalid8374 4 роки тому

    Great to know

  • @johanneskampfl6794
    @johanneskampfl6794 2 роки тому

    Best

  • @arvindchauhan9571
    @arvindchauhan9571 12 днів тому

    please help me
    for 120 bit shift logic

  • @rtlinsn5085
    @rtlinsn5085 3 роки тому

    In ARM, we only have ROR, no ROL!!

  • @abdallahsani5658
    @abdallahsani5658 3 роки тому +1

    I can tell he is German 😁, thanks a lot sir.

    • @hegamurl7434
      @hegamurl7434  3 роки тому

      Not trying to hide it 😁 you are welcome and thank you!

  • @sarahlabidi6558
    @sarahlabidi6558 Рік тому

    Great explanation! Thanks!