1 / 25

B ilgisayarlar kodu nasıl işler?

Learn about top-down and modular approaches in coding, advantages of breaking up code, storing code, different number systems, and representing alphanumeric information in computers.

anathanson
Download Presentation

B ilgisayarlar kodu nasıl işler?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bilgisayarlar kodu nasıl işler? • Top-down yaklaşım • Modüler yaklaşım

  2. Top down yaklaşım • In 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 method • Fast and easy when code was small and not very complex • As the code is processed, it is all loaded into memory

  3. Top down yaklaşım • So, the more programs you run, the greater the demands on the system in terms of memory and processor

  4. Top down yaklaşım • Also, the bigger the program you are loading, the longer and longer it will take to load up

  5. Top down yaklaşım • One is that you have to write code in such a way that it is hard to properlytest it until you have finished it. • Testing individual parts becomes a nightmare.

  6. Breaking 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 earlierand more often. • Debugging any code errors is a lot easier because you know what part of the code handles whataspect of the program. • You are in a position to reuse certain parts of your code in other projects more easily becausethey will be self-contained. • Building up a big project from smaller, interconnected chunks enables you to build up a projectover time and add more features as your skills improve!

  7. Re-usability

  8. Kodun Saklanması (Depolanması) • To really make applications usable, you need a way to store the code • Storage means that you only have to type or ( more accurately) create the code once, storing it for future access • Paper punch cards • Magnetic tape reels • Magnetic cassettes • Floppy disks (51/ 4 inch) • Floppy disks (31/ 2 inch) • Hard drives • Networked systems • CDs • DVD • Flash drives • Internet distribution

  9. Data • Data stored as binary

  10. Plain text vs. Compiled • The code can be in one of two forms • Plain text (Sade metin): Some code that you will come across will be stored and run in the plain text form — JavaScript and VBScript are good examples of this • Compiled (Derlenmiş): This is code that has been run through a program called a compiler. The compiler processes the plain-text code and changes it into something called “object code.”

  11. Plain text vs. Compiled • Plain text • The main advantage to code stored in plain text is that it is easily read, changes can be made to it easilyand quickly, and no special tools are required. • No protection! • Compiled • You 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 subsequentchanges to the code.

  12. Sayı Sistemleri • Decimal (Onluk sayı sistemi, On tabanlı) • 0 1 2 3 4 5 6 7 8 9 • Örnek: 1984 • Binary (İkilik sayı sistemi, iki tabanlı) • 0 1 • Örnek: 10011 • Hexadecimal (Onaltılık sayı sistemi) • 0 1 2 3 4 5 6 7 8 9 A B C D E F • Örnek: 1A2

  13. Onluk Sisteme Dönüşümler • Sağdan sola doğru taban değerini hesapla • ..., Taban3, Taban2, Taban1, Taban0 • Basamak değeri ile taban değerini çarp • Çarpımları topla • Örnekler: • (1984)10= (?)10 • (10011)2= (?)10 • (1A2)16= (?)10

  14. Onluk Sistemden Dönüşümler • Dönüştürülecek tabana bölüm • Örnekler: • (1984)10= (?)10 • (19)10= (?)2 • (418)10= (?)16

  15. İkilik sayı sisteminde terimler • Bit - 0,1 • Nybble – 4 bit • Örnek: 1010 • Byte – 8 bit • Örnek: 10101010 • Halfword – 16 bit • Örnek: 1010101010101010 • Word – 32 bit • Örnek: 10101010101010101010101010101010 • Doubleword – 64 bit • Örnek: 1010101010101010101010101010101010101010101010101010101010101010

  16. Binary ve Hexadecimal arasında dönüşümler • 0x3F7D (3F7D)16=(?)2 3 F 7 D 0010 1111 0111 1101 10111101111101 (101111)2=(?)16 0010 1111 2 F 2F

  17. Binary ve Hexadecimal arasında dönüşümler

  18. Sayı sistemlerinde matematik işlemleri • Başlat – Programlar – Donatılar – Hesap Makinesi

  19. Bu sinyal ne anlama geliyor? • ...---…

  20. Bilgisayarda Alfasayısal Bilginin Temsil Edilmesi • ASCII (American Standard Code for Information Interchange) • Bilgi Değişimi için Amerikan Standart Kodu

  21. Programming is great! • 010100000111001001101111011001110111001001100001011011010110110101101001011011100110011100100000011010010111001100100000011001110111001001100101011000010111010000100001

  22. Why Binary? • Tartışma Sorusu: Bilgi işleme sistemlerinde neden ikilik sistemi kullanıyoruz? Neden Onluk sistemi ya da diğer bir sayı sistemini kullanmıyoruz? • İki kişilik gruplar halinde tartışınız.

More Related