Это видео недоступно.
Сожалеем об этом.
Instruction Set Architectures
HTML-код
- Опубликовано: 15 авг 2024
- We've seen logic components in action in an earlier series, but how do we work with them when they are all packed together in a CPU? In this episode, we discuss instruction sets to better understand how we can control a CPU without in-depth understanding of its construction!
= CONTENTS PAGE =
0:00 Introduction
0:24 Video Overview
1:04 Why even have "Instructions"?
1:53 What are instructions?
2:47 Implementation-Independent Instructions
3:57 Representation of Data & Instructions
5:16 Examples of ISAs - The MIPS ISA
6:21 MIPS - J-Type Instructions
6:45 MIPS - I-Type Instructions
8:30 MIPS - R-Type Instructions
9:35 End of MIPS example
9:53 Assembly Languages
10:31 Example: MIPS Assembly
11:25 Higher Level Languages
12:18 Conclusion
= 0612 TV =
0612 TV, a sub-project of NERDfirst.net, is an educational RUclips channel. Started in 2008, we have now covered a wide range of topics, from areas such as Programming, Algorithms and Computing Theories, Computer Graphics, Photography, and Specialized Guides for using software such as FFMPEG, Deshaker, GIMP and more!
Enjoy your stay, and don't hesitate to drop me a comment or a personal message to my inbox =) If you like my work, don't forget to subscribe!
Like what you see? Buy me a coffee → www.nerdfirst.n...
0612 TV Official Writeup: nerdfirst.net/0...
More about me: about.me/lcc0612
Official Twitter: / 0612tv
= NERDfirst =
NERDfirst is a project allowing me to go above and beyond RUclips videos into areas like app and game development. It will also contain the official 0612 TV blog and other resources.
Watch this space, and keep your eyes peeled on this channel for more updates! nerdfirst.net/
-----
Disclaimer: Please note that any information is provided on this channel in good faith, but I cannot guarantee 100% accuracy / correctness on all content. Contributors to this channel are not to be held responsible for any possible outcomes from your use of the information.
8 years later I found this video as a newbie to CS, thank you so much!
You're welcome! Very happy to be of help =)
dude this video is vital for all students who are studying computer architecture...I like the way you explain clearly.
Hello and thank you very much for your comment! Glad you liked the video =)
You should totally get award for best teacher of the century. You just help me get over 3 weeks of frustration and sleepless nights. I found this lecture just when I was about giving up on choosing my current course. You did for me in 13minutes what 6 2hrs long classes could not do for me. No technological jargon, just simple terms. Thank you so much
You're welcome! Very happy to be of help =)
8 years later i still find this helpfull , am about to start my cs
That's great to hear! All the best for your CS journey =)
This is great! I love how the information is displayed with the colors. I started color coding my notes and it really helps break apart the information and categorize it, much more than with explanations for me!
Hello and thank you very much for your comment! Yes, colors are a really powerful way to create visual separation and groupings between things, and I find myself using it a lot to subtly convey certain ideas. Glad it worked well for you!
Seriously, this cleared up the overall point of ISA better in 13 minutes than my professor did over the course of two 2-hour lectures. I horribly confused me, but this is helping me definitely get going on my Assembly lab.
Hello and thank you very much for your comment! Very happy to be of help, and all the best with your work!
After watching multiple youtube videos on ISA, I can say this is the one that worked for me. Subscribed. Thanks!
Hello and thank you very much for your comment and support! Very happy to be of help =)
This is very simple and efficient videos.. loved it.
Hello and thank you very much for your comment! Very happy to be of help, glad you liked my work =)
dude you should totally do many more videos like these
Hello and thank you very much for your comment! Do check out the rest of the channel! While I'm not sure what particularly appealed to you in this episode, I try to do all my videos in the sand style, even if the content is different :)
This video is brilliantly made... simple, straightforward, and well constructed explanations. Than you for uploading this!
You're very much welcome! Glad you liked the video =)
DIS IS GOLDEN! I finally understand (sort of) how computers work
and it's just as tedious and difficult as I thought it would be BUT there are few tricks here and there to make it easier like the assembly language
I didn't know about that.
Hello and thank you very much for your comment! This is just a broad "high level" view of how these things work. Of course, if you delve further into the details the complexity definitely goes up!
can't believe I am seeing the same dude after how many years... nice video
Hello and thank you for your comment! Glad I can be of service again after all this time =)
great job taking us step by step through those "levels of abstraction" aka "the levels of compilation."
Hello and thank you very much for your comment! Glad you liked the video! Definitely felt that was necessary to fully appreciate the process!
thanks for saving Earth agaisnt Shao Kahn Mr. Liu Kang, I happy that now you are enjoying your life as a teacher, unexpected.
LMAO okay this one is completely unexpected.
Haha, I love how Assembly is presented as an easier solution than typing the bits directly. :) Great video man, very helpful and well explained.
Hello and thank you very much for your comment! Haha that's how I've always understood the role of assembly, it's basically machine code made "readable"!
Cool! Nice coincidence. I've been making a computer in logisim (that I will probably never finish), and the last thing I did was think about what instruction set it should have.
Good video, concise and clear. Good english pronunciation as well. Thanks
+EngineerWannabe Hello and thank you very much for your comment! Glad you liked the video =)
Nice job, man! Cleared a lot of stuff more than reading technical books.
Hello and thank you very much for your comment! Glad to be of help :)
I have never ever left my comment feedback on youtube for anyone. But you are the best, thanks for a really simple explanation. :) Respect Bro!
+Olim Normuhamedov Hello and thank you very much for your comment! Very happy to be of help!
Thank you for the simple and easy to understand explanation!
You're welcome! Glad you liked the video =)
This is the best video on ISA that i have watched so far. kudos
Hello and thank you very much for your comment! Happy to be of help =)
Nice! While I already know a bit about arch and assembly, I had never looked at a MIPS ISA before, so that was quite refreshing
Hello and thank you for your comment! Glad you found the video useful =)
Great video dude, only 13 mins but you squeezed a lot in, well done lol
Thank you very much! I usually get too ambitious and try to get too much information into my videos, glad I could keep the time relatively okay on this one, but for some other videos I just lose all semblance of control and they become 30 minutes long!
I suppose it depends on what ur explaining really, I think this channel's gonna grow. Keep up the cool videos coming dude!
Thank you! I definitely will =)
Hi, thanks . Explanations are very easy to understand even for a beginner in computer science. Thanks again
You're welcome! Very happy to be of help =)
I keep coming back to this video, and I think it was the video that introduced me to your channel....thanks from the Arabian peninsula
( the land of the two holy mosques)
Hello and thank you for your comment! Glad you liked my work =)
Great Video...it made ISA understand very simpler
Thank you very much! Glad you found the video helpful =)
This was incredibly well-explained, thank you.
You're welcome! Very happy to be of help =)
that was very interesting =D! Good video! :) & I love videos which are longer than 10 mins, perfectly to eat something to while watching ;D
hl2mukkel Thank you! Yes, there will be more long videos coming your way, so you'll be able to keep this up at least a little longer =D
Thanks for the info! Very illuminating as I seek to start teach my self systems programming with the hopes to develop on Risc-V.
Hello and thank you for your comment! All the best for your work, assembly programming is going to be challenging, but hopefully rewarding!
You're a big ass W man. hope You're doing great in life .
Hello and thank you very much for your comment! Glad you liked the video, and I'm doing alright, I suppose!
This was extremely helpful! Thankyou so much :)
+Rohana Jeyaraj You're welcome! Happy to be of help =)
Excellent video-very informative! It just so happens I'm going to be using MIPS for my computer architecture class :)
Thank you very much! All the best for your class :)
I like the way you describe things. Thank you!
You're welcome! Glad you liked the video =)
Thank you, It was quite insightful.
You're welcome! Happy to be of help =)
At what level does an ISA come into play? Is it processor dependent or software dependent. If I write a program on my computer, what determines what ISA it gets translated into?
Hello and thank you for your comment! Great question. Simply put, the ISA is "the language of the processor", ie, what you have to actually _tell_ your processor to make it do work. As such, to answer the first part of your question, it is processor dependent, not software dependent.
The translation is done by a compiler. The job of a compiler is to turn your high level code into something low level the processor can run. That is also why the result of compiling the same code doesn't always give you the same results depending on what computer you compile on. The code has to be compiled for a specific ISA, which is what creates the difference.
Great explanation! Thx a lot for making this video!!
Hello and thank you very much for your comment! Glad you liked the video :)
Thanks a lot ! It's the best and easiest way you explained ! Thanks
You're welcome! Very happy to be of help =)
amazing video , you made things easier to understand .. thanks
You're welcome! Very happy to be of help :)
Of course I'm gonna give this a like. Of course thanks for the video.
You're welcome! Glad to be of help =)
Great video!
Hello and thank you for your comment! Glad you liked the video =)
Really love this. Even me understand it easily.
Thank you very much! Happy to be of help =)
ISAs seem very similar to assembly language to me. Since intermediate steps are often a source of more complexity and headache, why are they used instead of pure assembly?
Hello and thank you for your comment! ISAs aren't "similar" to assembly language - They are the rules from which the assembly language instructions (on top of many other implementation details) are derived from. So it's less of an intermediate step, and more of a blueprint from which the assembly instructions can be created.
Very informative, thanks!
You're welcome! Very happy to be of help =)
this was ssssooooo helpful
thank you man
You're welcome! Very happy to be of help =)
Great explanation, thank you
You're welcome! Very happy to be of help =)
Great video
Hello and thank you for your comment! Glad you liked the video =)
This is really helpful bro. Nice!!!
Hello and thank you for your comment! Very happy to be of help :)
your explaining is amazing!
Thank you very much! Glad you liked the video =)
Great video :) thank you and your instructor for this quality content !
You're welcome! Very happy to be of help :)
thanks
You're welcome! Glad to be of help =)
Great lesson! Not a lot of lessons on this topic.
Thank you very much! Happy to be of help =)
9:30 I don't understand why R-Type has 127 instructions if the opcode always has to be 000000
Hello and thank you for your comment! While the R-Type only has one opcode, look at what the other bits are doing! The function bits right at the very end is what determines the actual function of the R-Type instruction, ie. By changing that, the instruction would do different things.
Thanks a lot. it's been a great help!
You're welcome! Glad to be of help =)
Excellent video. Just one clarification... so MIPS is an example of an ISA right?
Hello and thank you for your comment! Yes, the full definition of MIPS is an ISA. While people generally think of only the assembly language, its complete definition is indeed a complete ISA.
@@NERDfirst Thanks a lot!
Thanks very much! I learned a lot!!
You're welcome! Happy to be of help =)
thanks, really good explanation.
You're welcome! Very happy to be of help =)
many thx. I knew most of it by intuition however u managed to distilled in 13 minutes
You have confirmed my assumption
Do u have a video on how C/C++ compiler generates assembly code based on the instruction set?
If not plz contemplate one.
I came here looking for one
cheers man from #Palestine
Hello and thank you for your comment! I'm afraid that's beyond my area of understanding!
you deserve more views man
+hemlet Thank you! I probably would get some more views if I advertised!
Very well explained...... thumbs up.... (Y)
Thank you very much! Glad you liked the video =)
THANK YOU
You're welcome! Glad to be of help =)
this video is very helpful.... thanks man :D
You're welcome! Glad to be of help =)
extremely helpful!
Thank you! Very happy to be of help =)
great video, hope you could go more into the details of the instr. set
Hello and thank you for your comment! Is there anything in particular that is unclear that you would like me to address?
special cases like when you need to address a memory location whose address number is more than 2^26 in J type instruction
Hello again! Well, that would be very MIPS specific, which is something I'm not eager to do - Much of the content here is meant to be as broad as possible, instead of being specific to languages or packages. In fact in retrospect I spent a bit too much time on MIPS in this video...
How could I say Thank you so much to you! :)
You're welcome! Very happy to be of help =)
Thanks a lot man really helped me
You're welcome! Happy to be of help =)
great video! thank you!
You're welcome! Glad to be of help =)
big thanks
You're welcome! Glad to be of help =)
Great job!
Thank you! Glad you liked the video =)
can I ask for an explanation of how the instruction set implemented?
Hello and thank you for your comment! Unfortunately, the actual _implementation_ of an ISA is a huge topic with many parts to it. I found a nice presentation online that can get you started in your research on this topic: www.d.umn.edu/~gshute/mips/mips-intro.xhtml
The explanation was pretty good but I have some question. How Instruction Set Architecture is implemented in a processor. And how 1 and 1 input in an adder is turned into some strings of 0's and 1's by the help of ISA its a bit confusing. Also how does this opcode tells the processor to perform an addition.
+Akif Mac Hello and thank you for your comment! To understand the points you've raised, you have to understand some concepts of lower level logic - Things like logic gates and other components that work on the logic level that help to implement higher level concepts like addition.
Unfortunately, this is not something that can be explained quickly, though it really isn't very hard. Thankfully I already have a series covering these areas. If you're interested, please check it out: ruclips.net/p/PLJse9iV6Reqj1M8p1jzvv6Zzj0js_gawl
In the multiple layers of abstraction and what point does the OS come into play?
Hello and thank you for your comment! I think the OS is involved in quite a few parts. For one, the machine code needs to go "through" the OS to the hardware of the computer, though I'm honestly not sure whether the OS does any transformation to that, or if the instructions "pass straight through". This is also something that can potentially change from one implementation to another.
Is it 64 combination or permutation? By the way, what's the instruction set of the Dreamcast and the Switch and Playstation? Have you made your own CPU that made up for transistor (the huge ones) connected by wires like how they built things in the 70's before the microprocessor?
I'm quite rusty on my math, but I do believe this is combination, not permutation, ie. Every unique combination of zeroes and ones represents something different. However, there is no notion of reordering the same bit sequence, ie. If we have the sequence 0110, reversing the order of the two ones does not create a different sequence, it is still 0110.
You'll have to look up to see what ISAs the consoles used. Off the top of my head I only know the early PlayStations were MIPS CPUs.
I have not built my own transistor based CPUs! That's a huge undertaking. The most I've done is using transistors to build logic gates! You can find the series playlist on my channel.
I recently found this scaled up version of the microproccessor using discreet transistors. It's huge. It's in the Guinness Books of World Records. I wish it displayed the flow of the 0's an 1' in very slow motion and not just LED lights, lol : ruclips.net/video/lNa9bQRPMB8/видео.html
Thanks. Say, we compile the small character 'a' which has a binary of 01100001 on a PowerPC chip, does the PowerPC chip's instruction set jumble that binary, for the character 'a' in a different way so that it's not going to work on an Intel (and vice versa)? Also how come even if the Mac has Intel, the apps are still not compatible with Windows (and vice versa)?
Looks very interesting! Though I think showing the flow of 1s and 0s would be extremely challenging.
The example you've given with the letter "a" is called *encoding*. Strictly speaking, our encoding schemes are arbitrary, and even on the same computer you don't necessarily have to use the same encoding everywhere (eg. Most computers support encodings from the most primitive ASCII to the modern Unicode). The purpose is not so much for obfuscation as just different conventions used.
Incompatibility between operating systems arise from differences in the environment more so than the CPU architecture. Operating Systems expose a state and a set of functionalities that can be accessed from programs. Unsurprisingly, different operating systems will provide somewhat different functionalities, and more importantly, _how_ you access them are also different. Hence the incompatibility.
Well done.
GdnPro12 Thank you! Glad you liked the video =)
One question, though: if the opcode for the R format is always 0, then how do we get more options for operations? Aren't we in effect just wasting 6 bits by turning them all off?
Not really! While the opcode is indeed all zeros (and can only be that), it indicates to us that this, being an R-type instruction, has a specific format.
In particular, this format tells us to look at the last 6 bits of the instruction. That becomes a "secondary opcode" so to speak, telling us the exact function of the statement. The rest of the statement are the usual operands.
This is why we "get more opcodes". The one opcode (000000) can then lead us to one of 2^6, or 64 more instructions.
Thanks for responding! I think I get it. So we basically ran out of combinations in our opcode, which is limited to just 64 instructions, so we set the opcode to 0 and allocated 6 bits at the end of the instruction to act as the "new" opcode?
Exactly! That way, for the opcode "000000", we can get another 64 instructions there! So now MIPS can have a maximum of (64 - 1) + 64 = 127 instructions.
(We subtract 1 because "000000" can't be used to represent an instruction anymore).
Got it, thank you!
Thanks you too so much
You're welcome! Glad to be of help =)
I need someone help me in assembly language MIPS
Thanks man!
You're welcome! Glad to be of help =)
Thanks. This is the bane of why we can't just compile once and make it work with all kinds of computer.
Is an instruction set a kind of encryption, like the Enigma machine whereby you must have the code (in this case the instruction set) to decipher the jumbled words the 0s & 1s into something the CPU can understand so that it displays things on the screen correctly?
God bless, Proverbs 31
Hello and thank you for your comment!
I wouldn't consider this encryption, it's "obfuscation" at best! I would say encryption involves scrambling the information in a way that only the intended recipient can decrypt it.
In this case, we're simply representing the same information in a different language. An analogy of this would be translating, say, English to Spanish. It's true that we're using a "different code", but it's not encryption in the sense that there's no secrecy involved.
Hi. Thanks for mentioning obsfuscation which is a new word for me.
Instruction sets, very mysterious- I can't picture them out. Would you know of a site with the complete lists of these Instruction Sets for each architecture? I only know of Load. Where are the instruction sets store? Is it in another storage somewhere in the motherboard and what electronic component analyzes if a transistor is a 0 or a 1, what is that component that decides this is low power or high power so it's a 0 or 1compared to this voltage.
By the way what's the typical voltage determined by the companies say that this is 1? What about the voltage for 0?
Thank you. God bless, Genesis 1:3
I don't know of any complete lists, but you can always look up the instruction sets for a simple ISA like MIPS and that'll give you a very good idea of what's going on.
Assembly language is "assembled" into machine code (zeroes and ones) where each number represents an operation. This is what the computer eventually "executes".
Typically, what we call "Logic High" voltage is either 5V or 3.3V.
thanks bro
You're welcome! Happy to be of help =)
very helpful
+G KING Cheers! Happy to be of help =)
nice video
Hello and thank you for your comment! Glad you liked the video =)
hi thx for the videos, Is CISC and RISC comes under ISA??
Hello and thank you for your comment! RISC and CISC are two different types of ISAs and stands for Reduced or Complex Instruction Set Computing.
RISC has only a small amount of instructions so it's easier to learn, but more complex operations may require multiple instructions to implment. CISC does this for you by giving you many different instructions, some of which may be expressed in terms of other existing instructions.
the shift amount is 0000 what is the shift amount ?
Hello and thank you for your comment! The "shamt" is used for bit shifting operations, which, in a nutshell, "moves" all bits left or right within a binary number. eg. 0011010 left shifted by 1 gives you 0110100
Thank you bro....U R Amazing....you helped me a lot
great vid thanks#!
+Sammy S You're welcome! Happy to be of help =)
Thoughts on the RISC-V ISA?
Hello and thank you for your comment! Honestly I've never heard of this ISA before today! I'll definitely delve into it to see if I can learn something from it.
I also heard about it just today and it seems to be gaining popularity really quick! A video on the same would be nice whenever you have understood it!
Thanks
You're welcome! Happy to be of help =)
I needed help on Smartphone Benchmarking Principles please could u help.
Hello and thank you for your comment! I'm not quite familiar with benchmarking beyond a surface understanding, but feel free to ask. I'll research into it and see what I can find!
Thanks
Thanx
You're welcome! Glad you found the video useful.
Hi, I like the video, well done. I have a questios, maybe You know about isa instructions like BRM, BRME BRMI. I have a homework in arqchitecture of computer, and I don't Know the difference. Thank you !
Hello and thank you for your comment! The instructions you mentioned don't seem like MIPS instructions, but intuitively, an instruction starting with "BR" is a branch instruction (ie. The PC will jump to another position). Some branches are conditional (ie. Only jump if a condition is met). BRM may be "branch if more than", for example. You can search for an instruction reference for the language you are using to find out more.
+0612 TV w/ NERDfirst Thank you so much!
graet video
Hello and thank you for your comment! Glad you liked the video =)
Dude, you are fucking awesome man!
Thank you very much! Glad you liked the video =)
Random question : Why is your channel name icc0612 ?
+Ajinkya Jumbad Hello and thank you for your comment! The channel name comes from my initials + my birthday. I created it _many_ years ago and it stuck xD
兄弟看起来像中国人,这集视频内容找了很久,就是英语不太行,能放个中文字幕上去吗,感激不尽!
你好!我的华语沟通能力非常有限,恐怕没什么办法写出大量的中文字幕。 你可能可以利用 RUclips 的自动翻译功能来显示出华文字幕。看了如果有什么不太清楚的,可以再留下新的评论,我尽量帮你讲解。
cool man
Thank you! Glad you liked the video =)
Great video!
Thank you very much! Glad you liked the video =)