Fetch-Decode-Execute Cycle

Поделиться
HTML-код
  • Опубликовано: 28 авг 2024
  • Shows a typical fetch decode execute cycle for a machine code instruction (that uses implied addressing)

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

  • @suibhnesweeney3497
    @suibhnesweeney3497 2 года назад +7

    8 years on and these videos you made are still so informative wow man I love this so much

  • @glorioussoapbox
    @glorioussoapbox 9 лет назад +2

    John, this is some great stuff. Clear, straight to the point and at just the nice level of detail.

  • @sizzxrk
    @sizzxrk 9 лет назад +3

    Thanks again John! You saved me last year and this will be the first time you've saved me this year! Highly probable that it wont be the last either! Legendary.

    • @johnphilipjones
      @johnphilipjones  9 лет назад +3

      Thank you for your generous comments. I am glad the videos are helping you.
      Best wishes
      Phil
      (John Philip Jones)

  • @Pythagoras_was_right
    @Pythagoras_was_right 9 лет назад +2

    Thanks! I'm taking a Open University course in IT, and their explanation was very hard to follow. Yours was much easier. Much appreciated.

    • @johnphilipjones
      @johnphilipjones  9 лет назад +1

      Hello Chris,
      Glad it helped. Check out the others in the playlist at:
      ruclips.net/p/PL6lxxT7IdTxGXX6D6j-zjzcgoOD8WYMS2
      Rergards
      Phil
      (John Philip Jones)

  • @andrewskyworker
    @andrewskyworker 10 лет назад +1

    yes, it is really like having a personal tutor ,thank for your great work

  • @cursedfox4942
    @cursedfox4942 2 месяца назад +1

    Very nice explanation

  • @bipinsubedi6732
    @bipinsubedi6732 8 лет назад +2

    really great tutorial... liked it ........ I didn't expected that i will understand in such wonderful way.... thanks for the video..

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

    Sir thank you for your good work.

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

    What a great explanation. Thank you

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

    Thank you so much, learnt a lot from your video.

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

    this video is exactly what i needed, thank you!

  • @10356665
    @10356665 8 лет назад +7

    Thanks a million Sirs :)

  • @jonnyreh001
    @jonnyreh001 9 лет назад +3

    very nice! Thanks for that educational video.

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

    cristal clear..in 5 minutes...amassing..!!!!

  • @I_Like_Dimsum
    @I_Like_Dimsum 2 года назад +1

    what a beauty

  • @Jiberybob
    @Jiberybob 9 лет назад +2

    Really helpful, though would I be right saying the BR is sometimes referred to as the MDR? Never heard of a BR before.

    • @johnphilipjones
      @johnphilipjones  9 лет назад +2

      ***** Yes MDR is used and it is an example of a buffer register hence the BR I use in the video.Best wishes
      Phil

    • @Jiberybob
      @Jiberybob 9 лет назад +2

      Thanks very much

  • @XenoContact
    @XenoContact 7 лет назад

    Hello, I am a first timer on this channel and it looks great I loved the explanation. I have a question though, How and when is the Instruction's address loaded into the PC register?

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

      When a computer is switched on it always looks to the same memory location for its first instruction. Once switched on the operating system is responsible for deciding on the location of the next program (app) to be run.
      Regards
      Phil

    • @XenoContact
      @XenoContact 7 лет назад

      Oh so it's as if it is scouring through the memory one by one, starting from the OS's kernel and necessary programs all the way to the user's right?
      You deserve a lot in return for the help you're providing out here for free ! you're one great guy and I thank you a lot.

    • @johnphilipjones
      @johnphilipjones  7 лет назад

      XenoContact An operating system consists of numerous managers (groups of related software). One manager is responsible for monitoring the mouse, keyboard etc. If for example the user clicks the word icon then the operating system locates the software for word and runs it.
      Have a look at the following videos on operating systems:
      www.johnphilipjones.com/operating-systems1.html
      Regardless as to the program e.g word, a browser etc. they will all have a first machine code instruction. The address of this instruction will be loaded into the program counter. The address will not always be the same it depends on where the operating system loads it.
      Many machine code programs appear in devices such as a washing machine (that is an embedded system). Within these devices the machine code program will always be at the same address.
      Regards
      Phil

  •  9 лет назад +1

    Nice video. Thanks. But I still have a question. How does the "3C" get into the memory in the first place? In other words, if I write a code and it gets translated (let's suppose the entire code translated to 3C) it's still basically a text (because code translators are basically just giant string parsers). What transfers it to physical electronic impuls resulting in 3C being writen to memory?
    I hope I expressed myself properly. :D

    • @johnphilipjones
      @johnphilipjones  9 лет назад +4

      Samuel Leško When you switch on a computer the electronics generates a pulse of electricity that arrives at the reset pin of the central processor unit (CPU). Once reset the CPU always fetches from the same memory location. This location would be the boot program for the computer operating system. The boot program would have been ‘burnt’ onto the read only memory during manufacture (this memory is then fixed to this program).
      Once the boot program is called it is in control of the hardware of the computer. This boot program will proceed to load up the operating system and set various aspects of the computer. Once the operating system is in charge you as a user can issue commands that the operating system runs.
      One of these commands would be to load an editor into which you typed in your assembly language program (Inc A is an example of an assembly language instruction - numerous assembly language instructions make up you assembly language program). Once you have completed your typing you issue a command to assemble your assembly language program (an assembler is a program that will do this). This translates your assembly language program to a machine code program (e.g. Inc A becomes 3C).
      At the top of your assembly language program you issue directives as to where in memory you wish the machine code to be loaded. A loader (another computer program) then places the machine code in random access memory (memory that can be altered). Your machine code program is then fetch-decode-executed from this random access memory - starting at the first address of the machine code program. You indicate where the first address is using the directives at the top of your assembly language program.

    •  9 лет назад +2

      John Philip Jones Nice. Thanks a lot for the detailed description! It really helps me to understand this.
      But I still feel my question wasn't entirely answered (sorry :P), but now I know better what I am, in fact, trying to ask.
      So, how does the loader place the machine code instructions into memory? I mean, physically.
      The question that has been bothering me for quite some time is how or when does the information stored abstractly as code get transfered to physical information, physical current going through the wires of computer.

    • @johnphilipjones
      @johnphilipjones  9 лет назад +5

      Samuel Leško A computer system is essentially a number of pathways that carry electrical signals. The direction of these signals is controlled by logic gates (which are essentially switches). The electrical signals are either a high pulse or low pulse of electricity. A high pulse represents a binary one and a low pulse represents binary zero. Everything in a computer system is represented by binary numbers; consequently everything in a computer system is represented by electrical pulses.
      The opcode 3C is a hexadecimal number that we use as humans because it is easy to remember compared to binary numbers. Inside a computer the opcode 3C is a binary number byte and is 00111100. However, it is actually a low pulse, low pulse, high pulse, high pulse, high pulse, high pulse, low pulse, low pulse.
      Every memory location has an address which is a binary code. Every memory location has content which is again binary code. This content of a location can be an opcode, data or indeed another address that can be used to ‘point to’ another location.
      Binary codes (electrical pulses) representing an address of a memory location are sent along parallel lines of conductivity (called the address bus) to the memory chip. This selects a specific location from the memory locations available. Another pulse of electricity is sent along a control line to tell the memory chip it is to receive a binary pattern for storage. At more or less the same time the opcode 3C is sent as pulses of electricity along the data bus (a different set of parallel lines of conductivity).

  • @badis23
    @badis23 9 лет назад +5

    thank you so so MUCH

  • @rajeevranjan4013
    @rajeevranjan4013 8 лет назад

    thanks sir for clearing my doubts.

  • @oprabin
    @oprabin 8 лет назад +2

    well, you'll know a lot in this 5 minutes!
    :)

  • @chev_FTeam
    @chev_FTeam 9 лет назад +4

    A great video thank you, why are the memory address letter in that order and why is it ABCDEFHL, why not G,I,J,K,L,M?

    • @johnphilipjones
      @johnphilipjones  9 лет назад +5

      +Bruce Collier ABCDEFHL are the names of the registers inside the CPU. A is the accumulator and is shortened to A so the other registers follow on as B, C, D etc. The HL is related to the fact that this register can and does act as a pointer to a specific memory location. The H stands for High Byte and the L for Low Byte.
      Regards
      Phil

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

    That was excellent

  • @slaycap1277
    @slaycap1277 5 месяцев назад

    Hello, I have a question, why can't the PC be connected to the bus, why do I need the MAR register? The same question about the IR and BR register, thanks in advance for the answer.

    • @johnphilipjones
      @johnphilipjones  5 месяцев назад

      The PC and IR are designed to 'drive' the electrical signals around the electronics inside of the chip.
      The MAR connects to the address bus which has a different electronic circuit arrangement. The MAR has different levels of signals at its output to drive the address to the memory chip. It also allows the control unit to synchronise with the control signals. When the contents of the MAR are addressing the chips the PC will have moved on to the hold different content required for the next stage of execution.

    • @slaycap1277
      @slaycap1277 5 месяцев назад

      Thank you!

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

    Thanks a lot Sir.

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

    Do exe files also need to be decoded??? Because as per my understanding they are in binary

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

      Every computer program regardless as to the language is ultimately converted to machine code. It is the machine code that is executed. The machine code consists of many machine code instructions. Every instruction is executed using the fetch decode execute cycle. So every instruction will have a decode phase.
      Best wishes Phil

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

    thank you

  • @MrShibum
    @MrShibum 9 лет назад +1

    very good explained
    thank you

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

    Thanks for learn essembley language

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

    thank you !

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

    Great video, but regarding the decoder, anyone know how @4:09 "the electronics works out what 3C actually means." ? Anyone? Every video I've seen glosses over it, as is done here.

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

      A decoder informs the control unit as to the sequence of paths and gates it has to open and close in order for the control unit to action the instruction.
      The design of the circuits that perform this functionality consist of logic gates and sequential logic circuitry.
      It is a non trivial task that requires a background in electronics.
      Hope this helps.
      Best wishes
      Phil

  • @kartikpanicker9275
    @kartikpanicker9275 8 лет назад

    where does the ALU keep the 00H taken from A before incrementing??

    • @johnphilipjones
      @johnphilipjones  8 лет назад +1

      There are numerous registers throughout a CPU and the ALU has access to these registers. Not all of these registers are accessible to a machine code programmer. So in short the 00H is stored in a register.
      Regards
      Phil
      (John Philip Jones)

    • @kartikpanicker9275
      @kartikpanicker9275 8 лет назад

      Hello John,
      Really loved the video...Thanks for explaining it to me..Just I have one doubt..Please guide me, as how to obtain radical root architecture, where every other register is visible and everything is transparent..even though they aren't under the reach of programmer...I mean the TRUE 8085....all registers visible sort of architecture..

    • @johnphilipjones
      @johnphilipjones  8 лет назад

      Manufacturers of the chips give a programmers model of the CPU. That is they give access to all of the registers that the machine code instructions are able to access directly. The following link gives details on the chip you mentioned. There is a Micro Architecture image on this webpage that may help.
      Regards
      Phil

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

    Sir, thanks for your video. This video is really helpful. If Possible, could you please tell me the name(number) of the microprocessor system?

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

      It is based on the Zilog Z80 microprocessor.
      Best wishes Phil

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

      @@johnphilipjones Again, I really appreciate your help, Sir. Have a nice day!

  • @shibdasbhattacharya8189
    @shibdasbhattacharya8189 7 лет назад

    How does the program counter get the first address..can you please explain

    • @johnphilipjones
      @johnphilipjones  7 лет назад

      When the computer is switched on an electrical pulse is generated by the electronics. This pulse is applied to a pin on the CPU chip and the Program Counter of the CPU is loaded with the same address every time. The first program instruction is put in this location. This instruction is part of the operating system so the operating system is now in control. So every time you want to run a program the operating system loads the program counter with the address of the first instruction of the program you wish to execute.
      Regards
      Phil

    • @johnphilipjones
      @johnphilipjones  7 лет назад

      Shibdas Bhattacharya The same address is used everytime the computer is switched on. Everytime a new program executes the operating system will load the program and it will be a different address most time.

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

    gooooood

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

    sweet. thankss :)

  • @jiri.sikora
    @jiri.sikora 6 лет назад +1

    NICE :)

  • @ianjones7440
    @ianjones7440 7 лет назад

    Is the memory address register really the page table?

    • @ianjones7440
      @ianjones7440 7 лет назад

      Nice video btw nice and clear to understand

    • @johnphilipjones
      @johnphilipjones  7 лет назад

      No the memory address register is filled with the binary address that is to be transferred to the address bus. The contents of the page table are used when swapping between RAM and disk memory. The contents of the Page table would be transferred to the memory address register.

    • @ianjones7440
      @ianjones7440 7 лет назад

      John Philip Jones ahh so this is basically as low level as your gonna get lol... This is how the electric charges transfer binary on the cpu right?

    • @johnphilipjones
      @johnphilipjones  7 лет назад

      It is a model of what happens at the lowest level. For example below machine code there is microcode.

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

    tttttttttttttttttthhhhhhhhhhhhhaannnnnnnnnkkkkkkks

  • @Veenaali786
    @Veenaali786 9 лет назад +3

    Nice explanation