7 years later and this video is relevant now more than EVER! top man Mr. Jones! can't thank you enough Sir!
@johnphilipjones
3 жыл бұрын
Thank you. Best wishes Phil
@johnphilipjones
3 жыл бұрын
Thank you for your generous comment. Best wishes Phil
@jorgecarrascal5284
Жыл бұрын
I want to thank you for your video!!! I studied this long time ago, but it is wonderful you decided to post this video so more people can understand how a computer works!!! Information and understanding it, is important in human development!!!! THANK YOU
@johnphilipjones
Жыл бұрын
Thank you for your comment it is appreciated. Best wishes Phil
@Mikeymikers1
2 жыл бұрын
this helps me in understanding ethereum and how EVM bytecodes work. thanks a bunch!
@hongkongcantonese501
3 жыл бұрын
Extremely clear.
@tedwoodpeacock4689
6 жыл бұрын
Truly the most brilliant video series I have ever seen when it comes to explaining this topic. I can't believe how much I appreciate them. Thank you so much!
@prod.bythisjustin8449
4 жыл бұрын
you are literally amazing and finally, allowing me understand this topic for my ee class.
@alzalame
6 жыл бұрын
Probably the best explanation that i have ever seen , short , constructive , hit's brain directly , thank you very much !
@cherifaly6757
6 жыл бұрын
This is by far the best way of teaching computer science! Thanks alot!
@sayedkazimi6008
4 жыл бұрын
Very useful! I missed watching your videos. I like your explanation 👍🏼👍🏼
@petraflorkova2728
5 жыл бұрын
May I say... how GRATEFUL I am for your amazing videos Thank you
@2GFactFinder
7 жыл бұрын
Yes it is like having a personal tutor. Excellent and thank you very much.
@AndreUltrasi
8 жыл бұрын
Thank you so much, here in Brazil there aren't video explanations like this.
@FFoscarr
3 жыл бұрын
John phillip jones, this video is astounshing and really helped me. Really impeccable.
@TimCrinion
8 жыл бұрын
I really want to watch a video of how they got from fiddling with transistors by hand to something that can interpret instructions.
@johnphilipjones
8 жыл бұрын
+Tim Crinion That would be a long duration video Best Phil
@Dominoes282
8 жыл бұрын
+Tim Crinion I just went through a 4 month 200 level class to learn that. It's not easy m8.
@Daelion164
10 жыл бұрын
Thanks for this. You made something that I thought was complicated really, really simple.
@johnphilipjones
10 жыл бұрын
Thank you for your comment Bw Phil
@mashanishadi5911
10 жыл бұрын
Thank you so much! Your videos are very useful and easy to follow. please upload more!
@johnphilipjones
10 жыл бұрын
Thank you for your comments I hope to upload two or three a week. Bw Phil
@gamingweek-mv4mr
6 ай бұрын
Man you realy helped no would could help me like this keep up the good work
@maklasik
7 жыл бұрын
Was looking for this kind of explanation for 5 hours! Thank you very much.
@johntolkien9629
7 жыл бұрын
Great stuff Scouse ! Super clear presentation. Hope other "teachers" gain your skill in clear communication. Keep up the good work !
@christiancarter255
5 жыл бұрын
Beautiful! I want to one day program in binary. Literally. Even just a little. Thank you for showing binary representations of some the assembly instructions.
@protossscud8435
11 жыл бұрын
informative, good and clear tutorial , please make more , thanks !
@jay2short2
8 жыл бұрын
You replies are actually better than the video itself. Great information, Phil, nice one !
@a.a7907
7 жыл бұрын
Thanks for sharing these useful tutorials. They helped me a lot understanding how does CPU work, and how can I understand Assembly.
@johnphilipjones
11 жыл бұрын
Thank you for your comment. I am concentrating on Python videos at the moment but will return to more on machine code late next year. Best wishes Phil
@nontraditionaltech2073
3 жыл бұрын
AWESOME video, just subbed! I’m a CS guy that loves the CE domain more than anything. This video has really helped me, getting ready to start writing a 6502 emulator. I will for sure check out your other videos as well. Cheers!
@johnphilipjones
3 жыл бұрын
Thank you for the positive feedback it is appreciated. Best wishes Phil
@stephenbaka
7 жыл бұрын
Nice work, thank you for your clear explanation.
@isaiasprestes
5 жыл бұрын
Gosh! Finally a very good explanation about this topic. Thanks John!! You made my day!
@abdumo4336
3 жыл бұрын
Thank you Mr John!!!!
@hoangduy500
2 жыл бұрын
you just saved me. Thanks a lot :D!
@johnphilipjones
2 жыл бұрын
Good to hear that the video helped. Best wishes Phil
@sfxmzxc
Жыл бұрын
i'm lerning in chanel ser ...Thanks
@ameeaty4088
2 жыл бұрын
this was awesome thank you
@jibreelkeddo7030
7 жыл бұрын
I am not a CS major but rather an MIS major, it's cousin. I chose MIS to make getting an MBA easier in the future, but man, do I love coding from the bottom of my heart. It's awesome, and high level coding comes to me pretty naturally. Even if I will never use it, I want to learn low level coding too. It's fascinating. Now if only I could understand it just a bit better >.>
@fintarabg
10 жыл бұрын
Thanks! You should do more videos on this topic as you explain this matter very, very well!
@johnphilipjones
10 жыл бұрын
I will be doing more once I have finished doing the Python programming video Best wishes Phil
@angelfishgod
7 жыл бұрын
Very informative! Thank you for the quality upload.
@billyfromzera4162
Жыл бұрын
It old but it still so good
@2359-UK
8 жыл бұрын
This video is fantastic. thanks for the lecture. thanks for posting it.
@johnphilipjones
8 жыл бұрын
+Lo Janus Thank you for your generous comment. Regards Phil (John Philip Jones)
@AbhishekKumar-oy2hw
5 жыл бұрын
Thank you very much for this very clear and precise explanation..
@kcvinu
2 жыл бұрын
Helpful video.
@jibreelkeddo7030
7 жыл бұрын
This video helps a lot. Thank you :)
@hamzaism2712
11 жыл бұрын
awesome tuto ,and it will be great if you can make a series about programming in assembly (emulator 8086 or something like that ) and thanks
@nailnadiroglu8830
4 жыл бұрын
Great Teaching.
@khalidnawaz6536
3 жыл бұрын
VERY GOOD SIR.PLEASE UPLOAD FEW MORE VIDEOS
@johnphilipjones
3 жыл бұрын
Check out www.PythonByteSize.com Best wishes Phil
@hamzaism2712
11 жыл бұрын
awesome explanation thanx,and it will be great if you can make a video series about programming using emulator 8086 or something like that
@ehsanullahkhan5117
6 жыл бұрын
Very helpful. ... carry on plz
@anisassassino5000
6 жыл бұрын
thank you it was very helpful :D !
@NANO-SERWIS.MAREK-DASZKE
4 жыл бұрын
Very Nice :)
@micahgilbertcubing5911
6 жыл бұрын
Awesome! This helps so much with a personal project of mine (using logisim to simulate an 8 bit CPU)
@banwarifageriaexcelclasses1447
6 жыл бұрын
very educative lesson ..sir can you please , prepare simple and nice video on VBA for beginners
@vinayaksomalwar1232
10 жыл бұрын
Great video! Very visual! Keep it up!
@johnphilipjones
10 жыл бұрын
Thank you for commenting Bw Phil
@amanullahchandio2320
2 жыл бұрын
Thank you so much sir
@estebanmorales4089
5 жыл бұрын
Good video
@pcuser80
7 жыл бұрын
The great Z80!
@cronosfr1
3 жыл бұрын
thank you
@sirlottawin
7 жыл бұрын
Thank you so very much!
@eldarmv4865
6 жыл бұрын
Thank you very much
@michaelwilson5454
9 жыл бұрын
Very good video. You did a good job explaining this and the images shown really helps a lot. Thanks...
@johnphilipjones
9 жыл бұрын
Thank you Best wishes Phil Jones (John Philip Jones)
@alexpark-q8m
5 жыл бұрын
How are you doing sir, I liked this youtube very much sir, I am expected you are making these kind of, more sir
@sergeantcrow
9 жыл бұрын
Thank you for these tutorials... I am far more happier immersing myself in this type of learning activity than getting caught up watching political videos on KZitem.. For old times sake I have just discovered and installed Turbo C on my PCs like I used in the 90s...
@Abdullah_gujjar
10 ай бұрын
Thank you Sir ❤❤
@johnphilipjones
10 ай бұрын
Most welcome Best wishes Phil
@allenlin3136
9 жыл бұрын
It really helps. Thank you.
@dimitriosdesmos4699
7 жыл бұрын
Great stuff exactly what I wanted to form good foundations
@malteeaser101
10 жыл бұрын
I get how you know that 01H is 00000001 in binary... But how do you convert the LD A into binary? Or is it something your remember from a list? I have to convert it into machine code, is machine code binary?
@johnphilipjones
10 жыл бұрын
This is a very good question. Machine code is the language of the machine (I.e low and high voltage levels) which as humans we represent as binary. Every machine code instruction has it's own binary number. Load A with immediate data has the binary number 00111110 which is 3E in hexadecimal (an easy way to remember binary). So every instruction has it's own binary number. Every instruction has it's own binary number so in a sense it comes from a list as you suggest. However, in truth each number makes the electronics behave in a specific way. The binary patterns open and close electronic solid state switches that perform a simple task that when all executed in a specific order are able to implement sophisticated functionality.
@malteeaser101
10 жыл бұрын
John Philip Jones So does LOAD have it's own binary number? Or for example do LOAD A, LOAD B and LOAD C count as three different things with three separate binary numbers representing them? And does this mean that there is no way of mathematically converting LOAD A into binary in your head/on paper without a table that literally tells you which binary number represents each op code I think it's called?
@johnphilipjones
10 жыл бұрын
malteeaser101 LD A, N has its own binary number called an Operation code. LD B, N has a different operation code. When writing assembly language program you type in instructions such as LD A, N and an assembler (computer program) converts the assembly language to machine code (i.e. binary patterns). You can also do the conversion as a human it is called hand assembly and it means you would have to either know all the codes or access them from a printed list.Back in the day I used to code in assembly and as sad as it may sound I knew all of the codes. But there was only around 70 different instructions for the machines I was working on.
@malteeaser101
10 жыл бұрын
John Philip Jones Haha thanks, I have a assessment due in soon and this helped A LOT.
@johnphilipjones
10 жыл бұрын
Mo Fo Hello Mo, Every 'type' of CPU (processor) has its own machine code language and related assembly language. For example Intel processors are different to Motorola processors and have a different machine code language from one another. The description I have put forward is based on the Zilog Z80 processor which also has its own machine code language. I am unsure what machine code language you are referring to but what you are describing is what is often called absolute addressing The term addressing refers to how data is accessed by an individual machine code instruction. I have a short series of videos that show the difference. I have put links to their playlist below: kzitem.info/door/PL6lxxT7IdTxGXX6D6j-zjzcgoOD8WYMS2 Phil
@guliyevshahriyar
Жыл бұрын
thanks.
@MelissaMelissasthlm
2 жыл бұрын
Hello, great video. My question is , are the registers hexadecimal form?
@johnphilipjones
2 жыл бұрын
The registers actually hold binary patterns. It is usual to show these patterns in their hexadecimal form because as humans it is difficult for us to remember long binary patterns. It is much easier to remember hexadecimal and it is relatively easy to convert between binary and hexadecimal. Best wishes Phil
@173028718
7 жыл бұрын
Thanks a lot , Sir.
@freecrac
7 жыл бұрын
For Intel 80386+ CPU: Instruction Prefix 0 or 1 Byte Address-Size Prefix 0 or 1 Byte Operand-Size Prefix 0 or 1 Byte Segment Prefix 0 or 1 Byte Opcode 1 or 2 Byte Mod R/M 0 or 1 Byte SIB, Scale Index Base (386+) 0 or 1 Byte Displacement 0, 1, 2 or 4 Byte (4 only 386+) Immediate 0, 1, 2 or 4 Byte (4 only 386+) Format of Postbyte(Mod R/M from Intel-Doku) ------------------------------------------ MM RRR MMM MM - Memory addressing mode RRR - Register operand address MMM - Memory operand address RRR Register Names Filds 8bit 16bit 32bit 000 AL AX EAX 001 CL CX ECX 010 DL DX EDX 011 Bl BX EBX 100 AH SP ESP 101 CH BP EBP 110 DH SI ESI 111 BH DI EDI --- 16bit memory (No 32 bit memory address prefix) MMM Default MM Field Field Sreg 00 01 10 11=MMM is reg 000 DS [BX+SI] [BX+SI+o8] [BX+SI+o16] 001 DS [BX+DI] [BX+DI+o8] [BX+DI+o16] 010 SS [BP+SI] [BP+SI+o8] [BP+SI+o16] 011 SS [BP+DI] [BP+DI+o8] [BP+DI+o16] 100 DS [SI] [SI+o8] [SI+o16] 101 DS [DI] [DI+o8] [SI+o16] 110 SS [o16] [BP+o8] [BP+o16] 111 DS [BX] [BX+o8] [BX+o16] Note: MMM=110,MM=0 Default Sreg is DS !!!! 32bit memory (Has 67h 32 bit memory address prefix) MMM Default MM Field Field Sreg 00 01 10 11=MMM is reg 000 DS [EAX] [EAX+o8] [EAX+o32] 001 DS [ECX] [ECX+o8] [ECX+o32] 010 DS [EDX] [EDX+o8] [EDX+o32] 011 DS [EBX] [EBX+o8] [EBX+o32] 100 SIB [SIB] [SIB+o8] [SIB+o32] 101 SS [o32] [EBP+o8] [EBP+o32] 110 DS [ESI] [ESI+o8] [ESI+o32] 111 DS [EDI] [EDI+o8] [EDI+o32] Note: MMM=110,MM=0 Default Sreg is DS !!!! --- SIB is (Scale/Base/Index) SS BBB III Note: SIB address calculated as: =+*(2^(Scale)) Fild Default Base BBB Sreg Register Note 000 DS EAX 001 DS ECX 010 DS EDX 011 DS EBX 100 SS ESP 101 DS o32 if MM=00 (Postbyte) SS EBP if MM00 (Postbyte) 110 SS ESI 111 DS EDI Fild Index III register Note 000 EAX 001 ECX 010 EDX 011 EBX 100 never Index SS can be 00 101 EBP 110 ESI 111 EDI Fild Scale coefficient SS =2^(SS) 00 1 01 2 10 4 11 8
@tahir1156
2 жыл бұрын
Brilliant
@johnphilipjones
2 жыл бұрын
Thank you for your positive comment it is appreciated. Best wishes Phil (John Philip Jones)
@victorx4648
5 жыл бұрын
Good old Z80 assembly.
@harithreddy2603
10 жыл бұрын
thanq sir..good work.... like to see ur more videos on youtube
@johnphilipjones
10 жыл бұрын
Check out the following websites where I list all of the videos www.johnphilipjones.com/index.html www.pythonbytesize.com/ Best wishes Phil
@tobiasfurlan4812
2 жыл бұрын
Cheers man
@johnphilipjones
2 жыл бұрын
Thank you Best wishes Phil
@Mrkafirr
5 жыл бұрын
Thanks
@gregclare
Ай бұрын
Nicely done. But @5:54 the name “Immediate” actually refers to the operand being the actual data to operate on. As opposed to the operand being an address, or an offset, that points to the data (or further indirection). Specifically, “Immediate” does not mean the operand immediately follows the opcode, as you have stated. Clearly, the operand always immediately follows the opcode. The operand just isn’t always the “immediate” actual data to operate on.
@johnphilipjones
Ай бұрын
What you are referring to is addressing modes. If the data to be processed by the instruction follows the opcode, then the addressing mode is referred to as immediate addressing. Another instruction can have the address of the data just after the opcode. This address gives the memory address of where the data to be processed can be located. This type of instruction is said to have an absolute addressing mode. Immediate addressing is covered by the video at the link below: kzitem.info/news/bejne/pGyGmKdrg2uDlIIsi=LuW6LxR811gcGlZ_ Absolute addressing is covered by the video at the link below: kzitem.info/news/bejne/rW6IvIhms3lpjaAsi=EsyWTnOtZBb8ThUi As an aside the addressing mode shown in the video at the link below is an example of implied addressing. kzitem.info/news/bejne/uYNq0nucpYN3qXYsi=CwcaGDV0h8ju9Kso Best wishes Phil
@gregclare
Ай бұрын
@@johnphilipjones Hi Phil. I do understand all of that. I’m old school. I started off hand-assembling machine code on my own self-built 8-bit microprocessor designs in the late 70’s. So I do have a pretty solid understanding of all of this. I was just trying to give some helpful feedback for your students. What I was pointing out is that @5:54 you specifically say: “the name immediate addressing comes from the fact that the operand comes immediately after the opcode”. This statement is potentially confusing to learners. i.e. The fact that the operand comes immediately after the opcode is a general statement, not specific to the addressing mode. I believe what you meant to say is more along the lines of: “the name immediate addressing comes from the fact that the operand is the actual data to be processed by the opcode”. This would then be consistent with what you have now clarified in your reply above. Hopefully you take this as the helpful constructive feedback I'd intended. 🤓
@johnphilipjones
Ай бұрын
Hello Greg, Yes you are correct I missed your point initially. I am always happy for feedback and comments. It was, and is, taken as constructive. Best wishes Phil
@skynet320
9 жыл бұрын
Thank you sir for the video. But my question still is, how do you convert the assembly language code to machine code (opcode).Your reply will be much appreciated.
@johnphilipjones
8 жыл бұрын
+Hammad Ahmed You write your program in assembly language and an assembler converts the assembly language to machine code. Regards Phil (John Philip Jones)
@ankitkurup3891
8 жыл бұрын
sir ,is it true that increment operation is done in instruction decode phase only??
@johnphilipjones
8 жыл бұрын
It is part of the execute phase Phil
@fakeapplestore4710
7 жыл бұрын
yay! what a nice video
@awkb777
7 жыл бұрын
let me know if you have any questions
@danekerkkamp2746
2 жыл бұрын
So if I had for example machine code: 0xE1160547, the resulting assembly instruction would be the binary equivalent?
@johnphilipjones
2 жыл бұрын
Yes that is correct Best wishes Phil
@yasararafathn3283
6 жыл бұрын
I have got an idea thank u sir
@johnphilipjones
11 жыл бұрын
Hello Hamza, I am developing videos on Python at the moment. But will add some on assembly late next year. Best wishes Phil
@MrZacsim
10 жыл бұрын
Very good.
@johnphilipjones
10 жыл бұрын
Thank you Phil
@overclucker
6 жыл бұрын
I've been learning assembly for a while, but I had no clue that the destination register is part of the operator. I've been thinking of a and b as both being operands, but I guess it's not the case. Looks like people who use AT syntax are subtracting backwards =/
@johnphilipjones
6 жыл бұрын
With machine code I would recommend that you consider source and destination for the 'data items' (i.e. operands)
@zinturis
8 жыл бұрын
Great stuff! Thanks. Is it necessary to convert instructions and operands to hex numbers? Can you keep instructions as binary code instead of 3E or something like that?
@johnphilipjones
8 жыл бұрын
+zinturis You would normally code in assembly language and this is converted to the necessary binary codes by the assembler. So in the machine you would actually see binary and not hexadecimal. However, it is usual to look at the binary in hexadecimal as it is easier for us to remember hexadecimal numbers rather than long binary numbers and it is also easy to convert between binary and hexadecimal. The following videos look at converting between Hexadecimal and binary: kzitem.info/news/bejne/x56d0WaosaSfYIY kzitem.info/news/bejne/t2Oey2V_qWVngnY Best wishes Phil (John Philip Jones)
@zinturis
8 жыл бұрын
Thanks a lot for the quick answer. Sorry if my questions may sound stupid, I am quite newbie in this but if you want to send certain instructions of machine code to the processor, what's the workflow of that? Can you do it from some terminal or do you need to create a text file and save as .bin or .. how that works in practice? I mean, how to control that process?
@johnphilipjones
8 жыл бұрын
+zinturis You use an editor and type in your assembly language program and save it in a text file and use an assembler to convert your typed in program to machine code. You will need to download an assembler to match the CPU of your computer. However, a good way to learn is to download a CPU emulator that has an assembler incorporated. I used to do assembly programming on a Z80 flight micro-board, a 6511 micro-controller using an in-circuit emulator. However, these have now been superseded and I am not sure what is used today. However, I believe that the Raspberry Pi has a set up that allows for machine coding. I would recommend searching with the phrase "machine code emulator" and see what is out there to assist. Hope this helps. Best wishes Phil (John Philip Jones)
@zinturis
8 жыл бұрын
From your earlier respond, I understand that assembly language is different for different CPUs? So, if I write z=x+y for Intel it is not gonna work on an AMD based computer? So what's different? Assembly commands or register addresses?
@johnphilipjones
8 жыл бұрын
zinturis z = x + y is a high level statement and will be converted to the machine code of the CPU that is 'in' your computer by a compiler. However, putting this aside the opcode for add on each different type of CPU is different. Each processor also has a different register set i.e. different number of registers and of different lengths. The architecture of the CPU's can also be different some are RISC other CISC or a combination of both CISC and RISC.
@Sancarn
3 жыл бұрын
The lookup tables for getting from Assembly instructions to Opcodes - are these available / queryable from the OS?
@johnphilipjones
3 жыл бұрын
You would need to install an assembler. To get the opcodes search on google for the instruction set of the processor. Best wishes Phil
@billallwell6507
7 жыл бұрын
Very nice. So we can either write out the assembler on a piece of paper, then convert on the paper and then maybe (in the early days) use switches to set each memory address with the correct sequence of binary bits ? The part I still get stuck on is that the assembler can also be a program to convert the codes for us. Is this a program that would be loaded into memory, and therefore the first assemlber would have had to have been hand written (from what I've read, but still a little confused )and manually placed in the memory ?
@johnphilipjones
7 жыл бұрын
When you switch on a computer the electronics generates an electrical pulse. This pulse is applied to a CPU pin that causes a machine code instruction to be fetched from a specific memory location. This instruction is the first instruction of the boot program other instruction are then fetched decoded and executed in order one after another. This boot program then sets up the operating system by loading other programs that form the operating system. Once the operating system is in place it is able to load up other programs (such as the assembler) at the request of the user (i.e by clicking on an icon or by issuing a command). In the very early days switches were indeed throw to enter the program you wished to execute.
@unlokia
7 жыл бұрын
WOW, so easy! You've earned all your subs, and now you've got another one... ME! :) God bless you and thank you, have an amazing, prosperous life :)) Matthew, Northants.
@johnphilipjones
3 жыл бұрын
Thank you for your generous comments. Best wishes Phil
@junioralamu7438
Жыл бұрын
The op codes we learning are only 4 bits and the remaining 12 bits are the address, can you explain this? please
@johnphilipjones
Жыл бұрын
What processor are you using? Best wishes Phil
@ariseyhun2085
7 жыл бұрын
You used the term "INC A" quite often... but when you showed the binary or hex representation of it, it doesn't seem to include the 'A' part... I'm guessing because it's A (the first register of the CPU), you just omit it, but when you want to access B or C, would you simply have an operand directly proceeding the 3D (INC) Op Code? (Tried to make it as simple as possible to understand, sorry)
@johnphilipjones
7 жыл бұрын
INC B would have a different opcode. INC C would also have a different opcode
@ankitkurup3891
8 жыл бұрын
But increment doesn't need alu operation,then why it is a part of execution cycle...
@johnphilipjones
8 жыл бұрын
There is always a fetch of the opcode which then needs to be decoded to find out what this instruction (i.e. Opcode) is for. After the decode you are in the execute phase. An execute phase does not always mean that the ALU is used. For example moving data from a register to a memory location is an example of an execute phase.
@ShahidQureshi-ee6wz
5 жыл бұрын
Can assembly language play a significant role in programming for the Super Computers?
@johnphilipjones
5 жыл бұрын
I have never coded for a super computer so cannot really comment. However, I used to code a lot in machine code. What I can say is that all languages are translated to machine code which then 'controls' the microcode (and/or the 'hardwiring'). With a FULL knowledge of the CPU you can always ensure a very efficient execution time when using machine code (well assembly language to be more accurate). However, it would take you an extremely long time to code any meaningful system using machine code. The C programming language has many efficient libraries for controlling CPUs and C programs can be much quicker to 'code up' than assembly language.
@shuangwang1689
8 жыл бұрын
Thank you so much ^ ^
@simonlee2817
9 жыл бұрын
I want to know about how machine code is executed. I mean, since you already have these 1s and 0s in RAM, how can the CPU tell from so many instructions and do different actions correspondingly?
@johnphilipjones
9 жыл бұрын
+Simon Lee When you switch on a microprocessor system (e.g. a computer) the hardware will always look in the same memory location. This location must hold the first operation code to be executed i.e. the program to be executed starts at this memory location. For a computer this is the boot program. For an embedded system containing a microprocessor this location would contain the first operation code for the first program to be executed.
@simonlee2817
9 жыл бұрын
+John Philip Jones I am sorry, but I am still confused. I mean how the CPU can know these 1s or 0s mean MOV, ADD or SUB etc. How do 1s and 0s make sense to the CPU and indicate the CPU what to do?
@johnphilipjones
9 жыл бұрын
+Simon Lee A microprocessor system is a collection of million of switches that control the movement of binary patterns along bus systems, In addition these switches can be arranged to perform logic and arithmetic operations. The control of these switches is achieved by another lower level language that is not machine code. However, the machine code is able to dictate which parts of this lower level language execute. Certain patterns within the machine code select the Mov, Inc parts of the lower level language that is to execute.
@simonlee2817
9 жыл бұрын
+John Philip Jones So, there is a lower level language than machine code. What it is? It seems to be getting complicated, is there any website or book that gives a detailed information and help me understand?
@johnphilipjones
9 жыл бұрын
+Simon Lee One of the levels below is microcode and this is responsible for directing binary patterns throughout the CPU. The main controlling subsystem within the CPU is the control unit. However, my advice is not to go below machine code as unless you are an electronic engineer it is more likely to confuse any understanding of how you can control a microprocessor system using machine code. My recommendation is to consider the register set of a typical CPU and use register transfer language (RTL) to understand how each machine code instruction executes. The best way is to look at manuals associated with a microprocessor (although they are not easy reads). A good starting place is to search for the "Z80 assembly language manual". Hope this helps Phil
@s.dcreations3978
5 жыл бұрын
Sir,how opcode and operands are combined in an instruction and how they are seperated in an instruction.
@johnphilipjones
5 жыл бұрын
The first binary pattern (or first bits in the pattern) fetched fromm memory when you execute a program is always the opcode. Once decoded the instruction knows what to do with the rest of the instruction. This usually involve going back to the memory to get the operand. Once the current instruction has executed the CPU goes back to the memory to fetch the next instruction the and this will be the opcode.
@s.dcreations3978
5 жыл бұрын
@@johnphilipjones thank u sir and which digital circuits are invovlved in joining both opcode and operand together in an instruction.
@moon6080
7 жыл бұрын
would you be able to do a video on floating point binary?
@johnphilipjones
7 жыл бұрын
I will put it in the pipeline. Regards phi
@dylanisaac1017
4 жыл бұрын
where do you get this information from
@johnphilipjones
4 жыл бұрын
The chip manufacturers have manuals on instruction sets. I used the Z80 manual for the information in this video. Back in the day I used to program this chip using assembly language and machine code. Do a Google search on the following to get the manual. Zilog Z80 manual Best wishes Phil
@oscarepoant
5 жыл бұрын
A instruction has to be in program memory, doesn't it?
@johnphilipjones
5 жыл бұрын
Yes the instructions are in the computers memory. They are fetched from the memory. See the video at the following link: www.johnphilipjones.com/video-fetch-decode-execute-cycle.html
@sanaaf5209
10 жыл бұрын
How we should find opcode for an operation is there any method r it is assigned value
@johnphilipjones
8 жыл бұрын
+sanaaf Each microprocessor will have it own user manual and there will be a list of assembly language instruction and in the column next to the instruction will be the hexadecimal value for the instruction. However, you would normally type up the program using an editor and use an assembler to convert the program to machine code (i.e. hexadecimal which is a way to represent binary). Regards Phil (John Philip Jones)
@SubbirHosain
5 жыл бұрын
how to get opcode for different instruction set?
@johnphilipjones
5 жыл бұрын
The following link takes you to the instruction set for the Z80: z80-heaven.wikidot.com/instructions-set Best wishes Phil
@danishbhatia5004
9 жыл бұрын
hey thanx for this tutorial but how did you find the opcode for the instructions like inc, add, mov and so on....
@johnphilipjones
9 жыл бұрын
Danish Bhatia All microprocessors have an instruction set. This is a list of instructions in together with there hexadecimal equivalent. The link below will take you to an instruction set in PDF format which can be downloaded.
@johnphilipjones
9 жыл бұрын
Danish Bhatia oops this is the link: www.zilog.com/appnotes_download.php?FromPage=DirectLink&dn=UM0080&ft=User%20Manual&f=YUhSMGNEb3ZMM2QzZHk1NmFXeHZaeTVqYjIwdlpHOWpjeTk2T0RBdmRXMHdNRGd3TG5Ca1pnPT0=
@stephenobrien2952
4 жыл бұрын
what software do you use to produce the videos?
@johnphilipjones
4 жыл бұрын
I have put this info at the following link: www.pythonbytesize.com/educators.html Best wishes Phil
Пікірлер: 208