... konulu sunumlar: "Bilgisayarlar kodu nasıl işler?"— Sunum transkripti:
1Bilgisayarlar kodu nasıl işler? Top-down yaklaşımModüler yaklaşım
2Top down yaklaşımIn this scenario, when the code is run the computer starts reading at the top and continues down, going through each line of code until it reaches the end.Old methodFast and easy when code was small and not very complexAs the code is processed, it is all loaded into memory
3Top down yaklaşımSo, the more programs you run, the greater the demands on the system in terms of memory and processor
4Top down yaklaşımAlso, the bigger the program you are loading, the longer and longer it will take to load up
5Top down yaklaşımOne is that you have to write code in such a way that it is hard to properly test it until you have finished it.Testing individual parts becomes a nightmare.
6Breaking up Code There are huge advantages to coding in this way. The code is broken up into smaller components, so it is easier to write and you can test it earlier and more often.Debugging any code errors is a lot easier because you know what part of the code handles what aspect of the program.You are in a position to reuse certain parts of your code in other projects more easily because they will be self-contained.Building up a big project from smaller, interconnected chunks enables you to build up a project over time and add more features as your skills improve!
8Kodun Saklanması (Depolanması) To really make applications usable, you need a way to store the codeStorage means that you only have to type or ( more accurately) create the code once, storing it for future accessPaper punch cardsMagnetic tape reelsMagnetic cassettesFloppy disks (5 1/ 4 inch)Floppy disks (3 1/ 2 inch)Hard drivesNetworked systemsCDsDVDFlash drivesInternet distribution
12Plain text vs. Compiled Plain text Compiled The main advantage to code stored in plain text is that it is easily read, changes can be made to it easily and quickly, and no special tools are required.No protection!CompiledYou can’t look at the compiled code and get back to the source code that way. Therefore protected.You need to keep a copy of the source code in case you need to make any subsequent changes to the code.
13Sayı Sistemleri Decimal (Onluk sayı sistemi, On tabanlı) Örnek: 1984Binary (İkilik sayı sistemi, iki tabanlı)0 1Örnek: 10011Hexadecimal (Onaltılık sayı sistemi)A B C D E FÖrnek: 1A2
14Onluk Sisteme Dönüşümler Sağdan sola doğru taban değerini hesapla..., Taban3, Taban2, Taban1, Taban0Basamak değeri ile taban değerini çarpÇarpımları toplaÖrnekler:(1984)10 = (?)10(10011)2 = (?)10(1A2)16 = (?)10