Tampilkan postingan dengan label Arsitektur Komputer. Tampilkan semua postingan
Tampilkan postingan dengan label Arsitektur Komputer. Tampilkan semua postingan

Minggu, 07 Oktober 2018

Arsitektur Dan Organisasi Komputer : Definisi Arsitektur Komputer, Organisasi Komputer, Contohnya, Beserta Perbedaannya

Arsitektur dan Organisasi Komputer : Definisi Arsitektur Komputer, Organisasi Komputer, Contohnya, beserta Perbedaannya


Arsitektur Komputer




Arsitektur komputer adalah sebuah cabang informatika dikategorikan sebagai ilmu dan sekaligus sebagai suatu seni mengenai cara interkoneksi antara banyak sekali komponen perangkat keras atau hardware secara umum untuk sanggup membuat sebuah komputer yang sanggup memenuhi kebutuhan fungsional, kinerja, dan juga sasaran biayanya tanpa memperlihatkan detail yang banyak setiap fungsionalitas yang berbeda yang terkait dengan seorang programmer.

Dalam bidang teknik komputer, arsitektur komputer yaitu konsep perencanaan dan struktur pengoperasian dasar dari suatu sistem computer. Biasanya mempelajari atribut-atribut sistem komputer yang terkait dengan sanksi logis sebuah program.

Arsitektur komputer ini merupakan planning cetak-biru dan deskripsi fungsional dari kebutuhan bab perangkat keras yang didesain (kecepatan proses dan sistem interkoneksinya).

Dalam hal ini, implementasi perencanaan dari masing–masing bab akan lebih difokuskan terutama, mengenai bagaimana CPU akan bekerja, dan mengenai cara pengaksesan data dan alamat dari dan ke memori cache, RAM, ROM, cakram keras, dll). Beberapa rujukan dari arsitektur komputer ini yaitu arsitektur von Neumann, CISC, RISC, blue Gene, dll.


Arsitektur komputer juga sanggup didefinisikan dan dikategorikan sebagai ilmu dan sekaligus seni mengenai cara interkoneksi komponen-komponen perangkat keras untuk sanggup membuat sebuah komputer yang memenuhi kebutuhan fungsional, kinerja, dan sasaran biayanya.

Arsitektur komputer mempelajari atribut – atribut sistem komputer yang terkait dengan seorang programmer, dan mempunyai pengaruh eksklusif pada sanksi logis sebuah program.Sebagaimana contoh: set instruksi, aritmetika yang digunakan, teknik pengalamatan, prosedur I/0.

Arsitektur komputer ini paling tidak mengandung 3 sub-kategori :
  1. Set isyarat (ISA)
  2. Arsitektur mikro dari ISA, dan
  3. Sistem desain dari seluruh komponen dalam perangkat keras komputer ini.



Contoh Komputer Asritektur

Set instruksi
Aritmetika dan Cara kerja Prosesor dalam mengtransmit data
Cara kerja RAM dan L1 Cache bekerja
Mekanisme I/O
Logic Gates

Organisasi Komputer




Organisasi Komputer adalah bab yang terkait akrab dengan unit–unit operasional dan interkoneksi antar komponen penyusun sistem komputer dalam merealisasikan aspek arsitekturalnya.

Contoh aspek organisasional yaitu teknologi hardware, perangkat antarmuka, teknologi memori, dan sinyal-sinyal kontrol. Selain itu manifestasi hardware yang ditulis dibawah ini.

1. Komputer dengan spesifikasi
Intel Core 2 Quad Extreme QX9770
AMD Ryzen 7 2700X
Radeon HD 7770


Sebagai rujukan apakah suatu komputer perlu mempunyai isyarat pengalamatan pada memori merupakan duduk perkara rancangan arsitektural. Apakah isyarat pengalamatan tersebut akan diimplementasikan secara eksklusif ataukah melalui prosedur cache yaitu kajian organisasional.
Jika organisasi komputer mempelajari bab yang terkait dengan unit-unit operasional komputer dan hubungan antara komponen sistem computer,dan interkoneksinya yang merealisasikan spesifikasi arsitektural.


Perbedaan Arsitektur Komputer dengan Organisasi Komputer


Organisasi Komputer

  • Bagian yang terkait dengan akrab dengan unit – unit operasional
  • Contoh : teknologi hardware, perangkat antarmuka, teknologi memori, sistem memori, dan sinyal-sinyal control

Arsitektur Komputer

  • Atribut-atribut sistem komputer yang terkait dengan seorang programmer
  • Contoh : Set instruksi, aritmetika yang dipergunakan, teknik pengalamatan, prosedur I/O
Sumber

Slide AOK : Arstektur Komputer


Sumber http://wikiwoh.blogspot.com

Jumat, 05 Oktober 2018

Arsitektur Dan Organsisasi Komputer : Rangkuman Karakteristik Isyarat Mesin

Arsitektur dan Organsisasi Komputer : Rangkuman Karakteristik Instruksi Mesin



Sebuah operasi prosesor yang melaksanakan sebuah set isyarat sanksi disebut juga dengan istilah machine instructions.


Elemen Instruksi Mesin

Sebuah isyarat mesin harus berisi perihal info yang akan dipakai oleh prosesor sebagai proses eksekusi. Elemen tersebut ialah


  1. Operation Code
  2. Source operand refrence
  3. Result Operand Refrence
  4. Next Instruction Refrence


Berikut klarifikasi untuk keempat elemen tersebut





Operation Code

Merupakan sebuah specifier kode—ADD, I/O, MOVE—yang lalu disebut juga dengan operation code atau opcode


Source Operand Refrence

Merupakan sumber dari opcode yang sanggup berisi satu sampai lebih sumber


Result Operand Refrence

Merupakan hasil dari opcode


Next Instruction Refrence

Merupakan sebuah isyarat biar prosesor mengetahui operasi yang akan prosesor sanksi




Sumber dan result operand terbagi menjadi 4 bagian, yaitu;


  1. Main memory atau virtual memory
  2. Register Prosesor
  3. Immediate
  4. I/O Device


Berikut penjelasannya

Main memory atau virtual memory

Ketika isyarat untuk mengetahui ekseskusi yang selanjutnya akan dijalankan, sebuah main memory atau virtual memory address harus terdaftar atau tersuplai

Register Prosesor

Prosesor membawa satu atau lebih register yang akan dijalankan oleh machine refrences. Apabila membawa 1 register, refrence akan dilakukan secara implisit. Jika lebih dari 1, maka setiapregister yang dilakukan akan dilakukan dan diberi nama yang unik atau angka unik dan setiap isyarat harus berisi perihal angka yang sesuai dengan register.

Immediate

Sebuah nilai operand harus berisi isyarat yang sedang dijalankan

I/O Device

Instruksi harus berisi i/o module dan opersi device.


Instruction Representation



Sebuah isyarat harus direpresentasikan dalam bentuk bit. Contoh format isyarat bisa dilihat berikut.


Sebuah opcode direpresentasikan dalam bentuk abbreviations atau abreviasi yang lalu disebut dengan mnemonics. Contohnya


  • ADD Menambah
  • SUB Mengurang
  • MUL Mengalikan
  • DIV Membagi
  • LOAD Meng-load data dari memori
  • STOR Menyetor data ke memori
  • NOP Tidak ada operasi
  • ESC Keluar
  • BOUND Interrupt
  • ENTER Membuat Stack
  • WAIT Menahan aktivitas dikala aktivitas lainnya berstatus BUSY
  • HLT Menghentikan program
  • LOCK Mengunci Instruksi
  • LEAVE Kebalikan dari ENTER dimana menghentikan ENTER
  • CALL Memanggil Address

Contoh Format I

ADD R, Y

Contoh Format II ( Sebagai pola ENTER dan LEAVE )





Instruction Types



Dalam isyarat bahasa tingkat tinggi, bisa direpresentasikan dalam bentuk

X = X + Y

Maksud dari hal ini yaitu bahwa nilai akan dimasukkan ke dalam value Y dan lalu juga akan dimasukkan ke dalam X dan menyimpan hasil pada X. Dari hal inilah juga sanggup didapatkan bahwa operasi sanggup dilakukan dengan 3 isyarat sebagai berikut


  1. Load register dengan konten memori yang belokasi di X
  2. Tambahkan konten memori lokasi Y ke register
  3. Simpan data register ke dalam memori X


Kemudian dari hal tersebut juga—terdapat beberapa kategori tipe isyarat sebagai berikut:


  1. Data Processing—Instruksi Aritmetik dan Logic
  2. Data Storage—Pergerakan data dari atau ke register atau lokasi memori
  3. Data Movement—Instruksi I/O
  4. Control—Instruksi Test dan Branching


Penjelasan Instruction untuk kategori tipe isyarat

Aritmetika

Berisi kemampuan komputasional dalam memproses data numeric

Logic

Berisi kemampuan komputasional yang berbasisi Boolean

I/O

Membutuhkan transfer data dari device input dan hasil ke user

Test

Berupa set isyarat yang berfungsi sebagai set value test dari sebuah data atau status komputasional

Branch

Percabangan ke set isyarat yang berbeda tergantung hal-hal yang dihukum


Number of Addresses



Dalam hal ini, sebuah isyarat sanggup meminta untuk menciptakan sebanyak 4 refrensi alamat dengan spesifikasi


  1. Dua operan sumber
  2. Satu operan tujuan
  3. Alamat isyarat berikutnya


Sebagai pola yaitu set isyarat untuk menghitung Y = (A - B) / [C + (D X E)] dengan masing-masing 1, 2, dan 3 set isyarat





Instruksi Set Design



Hal yang paling penting dalam problem desain dasar sebagai berikut


  1. Operation Repetoire
  2. Data Types
  3. Instruction Format
  4. Registers
  5. Addressing


Berikut Penjelasannya

Operation Repetoire

Merupakan jumlah dari operasi yang akan disediakan

Data Types

Jenis data yang merujuk pada operasi

Instruction Format

Merupakan panjang isyarat dalam satuan bit, jumlah alamat, ukuran alamat, dan sebagainya

Registers

Jumlah register prosesor yang sanggup dirujuk dengan isyarat dan penggunanya

Addressing

Mode yang dipakai untuk memilih alamat operand


Sumber



Stallings, Williams. 2016. Computer Organization And Architecture: Designing for Performance Tenth Edition. United States of America. Pearson Education

M. Gilmore, Charles. 1996. Microprocessors: Principles And Applications Second Edition. New York. McGraw Hill

B. Brey, Barry. 1997. The Intel Microprocessor: 8086/8088, 80186/80188, 80286,80386,80486, Pentium, and Pentium Pro Processor Architecture, Programming, and Interlacing Fourth Edition. DeVry Institute of Technology. Prentice Hall International, Inc.


Sumber http://wikiwoh.blogspot.com

Kamis, 04 Oktober 2018

Arsitektur Dan Organisasi Komputer : Rangkuman Pengukuran Performa, Aturan Amdahl, Dan Aturan Little

Arsitektur dan Organisasi Komputer : Rangkuman Pengukuran Performa, Hukum Amdahl, dan Hukum Little



Designing For Performance 



Dasarnya setiap tahun, harga elektronika—terutama hal yang berbau perihal teknologi dengan basis prosesor dan mikroprosesor—akan terus turun. Hal ini dibenarkan pada justifikasi bahwa komputer—laptop dalam pola ini—tahun 1997, Gateway 2000, mempunyai harga sekitar 1499 dollar US ( 2360 dollar US untuk inflasi tahun 2019 ). Gateway 2000 ini tersendiri mempunyai spesifikasi berupa prosesor Intel Pentium II ( Clock Base 266MHz, 512K Byte Cache), RAM 128MB SDRAM, GPU AccelGraphics Permedia 2, dan Hard Drive 6.4GB Ultra ATA Drive. 

Akan tetapi sebab perkembangan prosesor yang jumlah transistornya akan bertambah tiap tahunnya, harga laptop Gateway 2000 jatuh ke harga 749 dollar US ( atau 1179 dollar US untuk inflasi tahun 2019 ). Perkembangan prosesor dalam hal ini mencakup kinerja image processing, 3-D Rendering, Speech and Voice Recognition, Videoconferencing, Multimedia, Video Editing, dan Simulation Modelling yang memang harus dituntut lebih cepat, kencang dan lebih baik dengan meniru jumlah transistor. Hal inilah—jatuhnya harga elektronik dengan perkembangan transistor yang bertambah—yang kemudian disebut dengan Hukum Moore—Moore’s Law. 


Microprocessor Speed



Mikroprosesor yakni sebuah central processing unit (CPU) elektronik komputer yang terbuat dari transistor mini dan sirkuit lainnya di atas sebuah sirkuit terintegrasi semikonduktor.

Seperti yang sudah dijelaskan sebelumnya perihal aturan Moore, bahwa setiap generasi gres dari suatu chip setiap tiga tahun dengan 4 kali lebih banyak transistornya, di dalam memory chip kapasitas DRAM—Dynamic Random Access Memory—akan 4 kali lipat lebih banyak pula. Dalam microprosesor, penambahan base speed, penambahan circuit gres terus berkembang tiap tahunnya dan bahkan semenjak Intel pertama kali merilis Intel x86 pada tahun 1978, perkembangan performa mereka akan 3 – 4 kali lebih cepat tiap 3 tahun. Hal ini juga tidak terlepas dengan bagaiman mereka membuat suatu prosesor secara kontemporer. 

Ada beberapa teknik untuk membuat prosesor secara kontemporer, meliputi 

  • Pipelining 
  • Branch Prediction 
  • Superscalar execution 
  • Data flow analysis 
  • Speculative execution 

Berikut Penjelasannya

Pipelining adalah sebuat set sanksi yang terdiri dari beberapa stage operasi, termasuk proses fetch instruksi, decoding opcode, perhitungan performa, dan lainnya yang bisa mengaktifkan sebuah prosesor untuk bekerja secara bersamaan dalam beberapa perintah. Pipeline bersifat assembly line. 

Branch Prediction adalah sebuah set aba-aba kode yang memberitahu prosesor sebuah aba-aba selanjutnya dari serangkaian proses. Maksunya yakni bahwa Branch Prediction akan menawarkan petunjuk perihal proses yang akan dilakukan oleh prosesor ibarat proses fetch memory, dan proses yang lainnya. 

Superscalar execution adalah sebuah kemampuan untuk melaksanakan satu atau lebih aba-aba dalam setiap prosesor clock cycle. Dalam hal ini, digunakanlah beberapa pipeline yang bersifat pararel. 

Data flow analysis adalah kemampuan sebuah prosesor untuk menganalisis aba-aba yang bergantung dari hasil data untuk membuat jadwal instruksi. Hal ini akan mencegah terjadinya delay yang tidak penting. 

Speculative execution adalah sebuah proses dari prosesor untuk mengspekulasikan aba-aba sanksi selanjutnya dari hasil sesungguhnya dan disimpan dalam daerah yang sementara. 


Performance Balance


Terkadang persoalan sanggup mucul sebab ada beberapa hal di dalam proses dalam prosessor ibarat persoalan mismatch antara sebuah prosessor dan main memory. Bisa saja saat kecepatan prosesor meningkat secara tajam, kecepatan transmisi data antara memori utama dan prosessor sanggup mengalami lag atau delay. 

Kunci utama biar kinerja prosesor optimal yakni sebuah keseimbangan atau disebut juga dengan balance. Seorang desainer harus dituntut bisa mengoptimalkan kinerja prosesor , memori utama, I/O devices, dan struktur interkoneksi. Hal ini harus terjadi dengan dilakukannya dua hal/faktor: 

  • Performa yang terus berubah di beberapa hal sanggup menjadikan perubahan secara dramatis 
  • Aplikasi gres secara konstan berubah nature yang berbasis dari demand dalam aba-aba profile 

Improvements of Chip Organization and Architecture



Ada 3 hal yang perlu diperhatikan dalam meningkatkan performa kecepatan prosesor 

  • Meningkatkan kecepatan hardware prosesor dengan meningkatkan base clock speed dari prosesor tersebut. 
  • Meningkatkan ukuran dan kecepatan caches 
  • Melakukan modifikasi terhadap aritektur dan organisasi prosesor yang sanggup meningkatkan kecepatan, efektifitas untuk melaksanakan set aba-aba eksekusi. 

Kemudian, meskipun ketiga hal yang mendasar untuk melaksanakan peningkatan prosesor secara hardware, tentu ada beberapa halangan atau rintangan untuk melaksanakan hal tersebut seperti; 

  • Power harus ditingkatkan kembali dayanya 
  • RC Delay yang terbatas sebab mengecilnya ukuran CPU secara umum 
  • Memori dan Latency lag speed 

Dua Hukum Performa Prosesor



Amdahl’s Law ( Hukum Amdahl ) 



Hukum Amdahl intinya bahwa kecepatan dalam aspek teknologi ataupun desain tidak menghasilkan peningkatan performa secara signifikan, tetapi melalui pembaharuan peralatan perangkat keras maupun perangkat lunak juga menjadi hal yang perlu diperhitungkan. Artinya, sebuah komputer dinyatakan meningkat kecepatannya apabila hardware diperbaharui ataupun software yang diperbaharui. 

Hukum Amdahl sendiri tercipta oleh Gene Amdahl di tahun 1967. Dalam aturan Amdahl, berisi cara untuk menghitung speed-up yang dilakukan yaitu dengan rumus berikut 


Dimana : 

F = proporsi waktu eksekusi 

N = speed up dari sistem yang sudah ditingkatkan 

Speedup = thoeritical speedup 

Contoh Soal 

Jika waktu sanksi yang dipakai akan 30% lebih efisien dan peningkatan performa yang terjadi akan 2 kali lipat. Maka rata-rata speedup yang terjadi : 



Dimana : 

Slatency = Speed Up secara umum ( rata-rata speedup ) 

p = Waktu Eksekusi 

s = Peningkatan Perfroma—speed up pada komponen tertentu 



Little Law ( Hukum Little )


Hukum Little ini berlaku dalam bentuk sistem antrian atau queuing system. Asumsikan elemen utama yakni sebuah server yang berisikan sebuah item. Item tersebut akan dijalankan dan didistribusikan ke sistem. Jika dalam keadaan idle—tidak sibuk, item akan dikirimkan secara langsung. Namun, apabila sedang sibuk, iteam akan dikirim ke daerah queue—diantrikan. Tempat queue juga ada macamnya—single dan multiple. 

Bedasarkan ilustrasi tadi, Hukum Little dapar diekspresikan melalui rumus berikut: 



Dimana 

L = Rata-rata unit yang terjadi pada satu waktu
λ = Item per unit time 
W = waktu 


Basic Measure of Computer Performance



Ada 2 hal yang mendasar perihal perhitungan dasar sebuah performa komputer, yaitu meliputi; 

  • Clock Speed 
  • IER ( Instruction Execution Rate ) 

Clock Speed



Clock Speed secara harfiah berarti kecepatan clock. Secara istilah berarti besaran kecepatan yang dilakukan oleh sebuah prosesor untuk mengirimkan sebuah set aba-aba atau siklus aba-aba per detiknya--tempo dari prosesor. Lazimnya dikenali dalam bentuk Hz—satuan frekuensi. Sebagai contoh, sebuah prosesor Intel® Pentium Gold G4560 mempunyai base clock speed sebesar 3.5GHz. Hal ini berarti sebuah prosesor Intel® Pentium Gold G4560 bisa mengirimkan atau melaksanakan set aba-aba dari siklus aba-aba sebanyak 3.5 x 109 aba-aba per detiknya atau 3,5 miliar pulse per second. 

Kecepatan prosesor Intel® Pentium Gold G4560 dengan kecepatan 3.5GHz disebut juga dengan Clock Rate atau Clock Speed. Dalam increment tingkat 1, atau satu pulse biasa juga disebut Clock Cycle atau Clock Tick. Waktu antara pulse dengan pulse disebut dengan Cycle Time. 



Instruction Execution Rate 

Eksekusi Instruksi Rate sanggup dihitung dengan rumus berikut 



Dimana : 

CPI = Rata-rata cycle per instruction keseluruhan 

CPIi = cycle yang diharapkan dari sebuah aba-aba tipe i 

Ii = Jumlah aba-aba tipe i yang diberikan jadwal yang dilakukan 

Ic = Jumlah aba-aba keseluruhan 


Kemudian sanggup diekspresikan sebagai berikut 


Kita sanggup mengetahui bahwa CPI itu sendiri diproses oleh prosesor, memory, dan memori cycle time. Makara kita sanggup merumuskan kembali sebagai berikut.



Dimana : 

T = prosesor time yang diharapkan untuk mengeksekusi program 

Ic = Jumlah aba-aba keseluruhan 

p = jumlah siklus prosesor yang diharapkan untuk decode dan mengeksekusi instruksi 

m = Memori yang dibutuhkan 

k = rasio antara waktu siklus memori dan siklus prosesor 

τ = konstata cycle time


Bedasarkan rumus tersebut pula, kita sanggup mengetahui faktor-faktor yang menghipnotis performa, yaitu 

  • Arsitektur Set Instruksi 
  • Teknologi Compiler 
  • Implementasi Prosesor 
  • Cache dan Hieraki Memori 


Ada juga yang disebut dengan MIPS atau millions of instruction per second yang berarti sebuah pengukuran umum untuk performa prosesor yang dirumuskan sebagai berikut 


Dimana 

MIPS Rate = Jutaan Instruksi per Detik 

F = Frekuensi 

CPI = Rata-rata Cycle keseluruhan 

Ic = Jumlah Instruksi Keseluruhan 

T = prosesor time yang diharapkan untuk mengeksekusi program 

Selain MIPS Rate, ada pula MFLOPS Rate atau millions of floating-point operations per second. MFLOPS Rate diimplementasikan pada performa aba-aba floating-point pada aplikasi saintifik dan permainan gim. Berikut rumusnya 



Sumber 

Stallings, Williams. 2016. Computer Organization And Architecture: Designing for Performance Tenth Edition. United States of America. Pearson Education 

M. Gilmore, Charles. 1996. Microprocessors: Principles And Applications Second Edition. New York. McGraw Hill 

https://itstillworks.com/specifications-gateway-2000-computer-7699939.html

https://ark.intel.com/content/www/us/en/ark/products/97143/intel-pentium-processor-g4560-3m-cache-3-50-ghz.html

Sumber http://wikiwoh.blogspot.com

Senin, 10 September 2018

Arsitektur Dan Organisasi Komputer : Arsitektur Mata-Mata X86

Arsitektur dan Organisasi Komputer : Arsitektur Intel x86



Intel x86 Architecture Evolution


8080 


  • The world’s 1st general-purpose microprocessor. 
  • 8-bit machine. 
  • 8-bit data path to memory. 
  • Was used in the first personal computer, the Altair.

8086


  • 16-bit machine. 
  • wider data path. 
  • larger registers. 
  • instruction cache / queue, that prefetches instructions before execution. 
  • It’s variant: 8088, is IBM’s 1st personal computer. 
  • 1st appearance of the x86 architecture. 
  • 1-MByte memory addressing.

80286 


  • extension of 8086, enabled addressing a 16-MByte memory. 

80386 


  • Intel 1st 32-bit machine.
  • support multitasking. 
  • could run multiple programs at the same time. 

80486 


  • more sophisticated and powerful cache technology. 
  • sophisticated instruction pipelining. 
  • built-in math coprocessor.



Pentium 


  • use of superscalar technology. 
  • allows multiple instructions to execute in parallel. 

Pentium Pro 


  • aggressive use of register renaming. 
  • branch prediction, data flow analysis, speculative execution. 

Pentium II 


  • Intel MMX technology. 
  • designed to process video, audio, and graphic data efficiently. 

Pentium III 


  • additional floating-point instructions to support 3D graphics software.

Pentium 4 


  • Addition floating-point and other enhancements for multimedia. 

Pentium M / Core 


  • The 1st Intel x86 microprocessor with a dual core . 
  • implementation of two processor on a single chip. 

Pentium D 


  • 64 bit 
  • high frequency, SSE3 

Core 2 ( Centrino )


  • extends to 64-bit. 
  • Core 2 Quad provides 4 processors on a single chip.



Intel Core i3, i5, i7 


  • Hyper-Threading 
  • Intel Turbo Boost 
Xeon


  • Dedicated for multi-threading ( usually used for workstation )


Atom 


  • 32 bit 
  • very-low-power 

Intel Core (2nd Gen, 3rd Gen - 8th Gen) 


  • High clock rate 
  • onboard GPU

Intel Core i9 ( 7th Gen upwards )


  • Much faster than i7 ( dedicated for rendering )



8088 Memory Architecture


The 8088 can address 1 MB of memory. However, it has no registers larger than 16-bits. 1MB = 210 x 210 Bytes. 16-bit -> 210 x 26 memory addresses 

The 8088 broke up memory into segments called paragraphs.



The address of a specific byte in memory is the sum, after an appropriate shift, of two registers. Intel processors with 32 bit registers still store paragraph boundary using 16 bits, but use a 32-bit offset to the address.




8088 Memory Organization

Generally consists of program, data, stack. Their memories occupy the same memory space. Total addressable memory size is 1 MB.



Registers

Registers are used to store segment and offset values. These registers are still present in today’s Intel architectures. The programming model of the 8086 through the Pentium II’s considered to be aktivitas visible. Its registers are used during application programming and are specified by the instructions. 

Other registers, are considered to be aktivitas invisible. They are not addressable directly during applications programming, but may be used indirectly during system programming.

Only the 80286 and above contain the program-invisible registers used to control and operate the protected memory system. The earlier 8086, 8088, and 80286 contain 16-bit internal architectures, a subset of the registers. The 80386, 80486, Pentium, Pentium Pro, and Pentium II microprocessors contain full 32-bit internal architectures. The architectures of the earlier 8086 through the 80286 are fully upward-compatible to the 80386 through the Pentium II.


The Programming Model of Intel



16-bit architecture


  • 8086 
  • 8088 
  • 80286 

32-bit architecture 

Shaded area are additional registers for these types


  • 80386 
  • 80486 
  • Pentium 
  • Pentium Pro 
  • Pentium II 

The programming model contains 8-, 16-, and 32-bit registers. The 8-bit registers: AH AL BH BL CH CL DH DL are referred to when an instruction is formed using these two-letter designations. The 16-bit registers are AX BX CX DX SP BP DI SI IP FLAGS CS DS ES SS FS GS. The extended 32-bit registers are EAX EBX, ECX EDX ESP EBP EDI ESI EIP EFLAGS. These 32-bit extended registers, and 16-bit registers ES and GS are available only in the 80386 and above.

Some registers are general purpose or multipurpose registers, while some have special purposes. The multipurpose registers include EAX EBX ECX EDX EBP EDI ESI. Hold various data sizes (bytes, words, or doublewords) and are used for almost any purpose, as dictated by a program.


Register Types


1. General-purpose/multipurpose register 


  • Data registers : EAX, EBX, ECX, EDX 
  • Offset registers : EBP, EDI, ESI 

2. Special-purpose register 


  • Offset registers: EIP, ESP 
  • Segment registers: CS, DS, ES, SS, FS, GS 
  • EFLAGS


Data Register

The four 32-bit data registers are EAX EBX ECX EDX. Each addressable as 32-bit registers, 16-bit registers (the lower 16 bits), or two 8-bit registers :



EAX ( accumulator ) 

Used for instructions such as addition, subtraction, multiplication, division, and some of adjustment instructions. In 80386 above, it may also hold the offset address of a location in the memory system. 

EBX ( base index ) 

BX sometimes hold the offset address of a location in the memory system. In 80386 above, EBX also can address memory data.

ECX ( counter ) 

Hold the count for various instructions: repeated string instructions (REP/REPE/REPNE), shift, rotate, and LOOP/LOOPD. In 80386 above, it also can hold the offset address of memory data. 

EDX ( data ) 

Holds a part of the result from a multiplication or part of the dividend before a division.



Offset Registers

IP ( instruction pointer ) 

Addresses the next instruction in a section of memory defined as code segment. It used to find the next sequential instruction in a aktivitas located within the code segment. Can be modified with a jump or a call instruction. 

SP ( stack pointer ) 

Addresses an area of memory called stack. Its stacks memory stores data through this pointer. 

BP ( base pointer ) 

BP also an offset for stack segment. It points to a memory location for memory data transfer.

SI ( source index ) 

Addresses source string data for the string instructions. Offset for the data segment. 

DI ( destination index ) 

Addresses string destination data for the string instructions. Offset for the data segment or extra segment.


These registers are still used today, but have been expanded to 32 bits. These registers have been respectively rename EIP, ESP, EBP, ESI and EDI.




Segment Registers

CS ( code segment ) 

Holds the code (programs and procedures) used by microprocessor, defines the starting address of the section of memory holding code. 

DS ( data segment ) 

Contains most data used by a program. Can be accessed by an offset address. 

ES ( extra segment ) 

Used by some of the string instructions to hold destination data. 

SS ( stack segment ) 

Defines the area of memory used for the stack. 

FS & GS ( stack ) -> 80386 above only 

Allow 2 additional memory segments for access by programs.


Status Flag Register


EFLAGS 

Indicate the condition of the microprocessor as well as control its operation. Upward-compatible from the 8086/8088 to the Pentium II microprocessor. The 8086-80286 contain a FLAG register (16 bits) and the 80386 and above contain an EFLAG register (32-bit extended flag register).

The rightmost five flag bits and the overflow flag change after many arithmetic and logic in­structions execute. The flags never change for any data transfer or aktivitas control operation. Some of the flags are also used to control features found in the microprocessor. 


EFLAG and FLAG register (8086 -> Pentium)

C ( carry )

  • holds the carry after addition or the borrow after subtraction.
  • also indicates error conditions as dictated by programs and procedures.

P ( parity )

  • a count of ones in a number expressed as even or odd.
  • 0 : odd parity, 1: even parity.
  • E.g : If a number contains 3 binary one bits, it has odd parity. If a number contains zero one bits, it has even parity.

A (auxiliary carry)


  • holds the carry (half-carry) after addition or the borrow after subtraction between bits position 3 and 4 of the result. 
  • Used for decimal arithmetic using the low order four bits of AL

Z ( zero ) 

  • shows that the result of an arithmetic or logic operation is zero 
  • 1: result equals zero, 0: otherwise.

S ( sign ) 

  • holds the arithmetic sign of the result after an arithmetic or logic instruction executed. 
  • 1: negative, 0: positive. 
O ( overflow )


  • indicates that the result has exceeded the capacity of the machine.
T ( trap )

  • enables trapping through an on-chip debugging feature.
  • 1: interrupts the flow of the program.
  • 0: trapping/debugging feature is disabled.

I ( interrupt )

  • controls the operation of the INTR (interrupt request) input pin.
  • 1: INTR pin is enabled.
  • 0: INTR pin is disabled.

D (direction)

  • selects either the increment or decrement mode for the DI and/or SI registers during string instruction.

IOPL (I/O privilege level)

NT (nested task)

RF (resume)

VM (virtual mode)

AC (alignment check)

VIF (virtual interrupt flag)

VIP (virtual interrupt pending)

ID (identification)


Operation Modes

Real mode operation 

  • the only mode available in 8086/8088. 
  • allows the microprocessor to address only the first 1MB of memory space.

Protected mode operation 

  • only in 80286 and above. 
  • allows the microprocessor to address above the first 1MB of memory as well as within the first 1MB of memory


Real Mode

The DOS operating system requires the microprocessor to operate in the real mode. Real mode operation allows application software written for the 8086/8088 to function in the 80286 and above without changing the software.

Read Mode uses segment and an offset registers. Segment defines the beginning address of any 64KB memory segment. Offset selects any location within 64KB memory segment.

E.g. : 

  • segment : 1000H 
  • offset : F000H 
  • shift 1000H by 1 place -> 10000H 
  • add 10000H + F000H 
  • so, memory the location is 1F000H



Absolute Memory Location

(Segment value * 16) + Offset value

Memory address written as segment:offset


Default {segment:offset} in real mode (8086 - 80286)



Protected Mode

Segment address is no longer present, substituted with selector and descriptor. But, offset is still present !


  • Selector : selects a descriptor from a descriptor table. 
  • Descriptor : describes the memory segment’s location, length, and access rights. 

The instructions are identical with real mode. Most programs written to function in real mode will function without change in the protected mode.

2 descriptor tables with the segment registers :

  • Global (system) descriptors : contain segment definition that apply to all programs. 
  • Local (application) descriptors : contain segment definition that unique to an application. 
Each descriptor tables contains 8,192 descriptors


Example of the accessing using protected-mode



Instruction Set


Data moving instructions. 

  • Arithmetic - add, subtract, increment, decrement, convert byte/word and compare. 
  • Logic - AND, OR, exclusive OR, shift/rotate and test. 
  • String manipulation - load, store, move, compare and scan for byte/word. 
  • Control transfer - conditional, unconditional, call subroutine and return from subroutine. 
  • Input/Output instructions. 
  • Other - setting/clearing flag bits, stack operations, software interrupts, etc.


Types of Operands


  • Addresses 
  • Numbers 
    • Integer/floating point. 
  • Characters 
    • ASCII etc. 
  • Logical Data 
    • Bits or flags. 
  • (Aside: Is there any difference between numbers and characters? Ask a C programmer!)

General Data Types

  • 8 bit (Byte) 
  • 16 bit (word) 
  • 32 bit (double word) 
  • 64 bit (quad word) 
  • 128 bit (double quadword) 

Addressing is by 8 bit unit. Words do not need to align at even-numbered address. Data accessed across 32 bit bus in units of double word read at addresses divisible by 4. It classified as a little endian.


Numeric Data Types




Byte Ordering

What order do we read numbers that occupy more than one byte ?

e.g. (numbers in hex to make it easy to read)

  • 12345678H can be stored in 2 x 16-bit locations as follows

Big Endian 

  • Left to Right 
  • Most significant byte in the lowest numerical byte address


Little Endian


  • Right to Left 
  • Least significant byte in the lowest numerical byte address



C Data Structure to Endian Mapping




References

http://www.cs.mcgill.ca/ adenau/teaching/cs573/Intel_x86.pdf 

https://www.byclb.com/TR/Tutorials/microprocessors/ch2_1.htm 

Stalling, William. (2013). Computer Organization and Architecture Designing for Performance.9th Ed. USA: Pearson.

Slide AOK : Architecture of Intel x86


Sumber http://wikiwoh.blogspot.com