PART A BAHAGIAN A Answer ALL questions. Jawab SEMUA soalan. Question Soalan a) Briefly explain the concept of Clock Gating. [Terangkan secara ringkas konsep Selakan Denyut.] [2 Marks/Markah] b) Define Register Transfer Language (RTL) [Definisikan Bahasa Pemindahan Daftar.] [2 Marks/Markah] Figure. Rajah. 2/4
2 c) Refer to Figure.. The circuit functions as a shift register with parallel load. Write the Register Transfer Language for the given circuit. [Rujuk Rajah.. Litar tersebut berfungsi sebagai daftar anjak dengan masukan data selari. Tuliskan Bahasa Pemindahan Daftar (RTL) untuk litar tersebut.] [2 Marks/Markah] Figure.2 Rajah.2 d) Refer in Figure.2. Register 0 receives data transfers from more than one sources. A dedicated multiplexer is used to select the input. Transform the detail logic diagram to a Register Transfer Language (RTL). [Merujuk pada Rajah.2. Daftar 0 menerima pemindahan data lebih daripada satu sumber. Satu pemultipleksdigunakan sebagai pemilih data yang dikehendaki. Terjemahkan litar logik lengkap kepada Bahasa Pemindahan Daftar (RTL)] [2 Marks/Markah] 3/6 3/4
3 Figure.3 Rajah.3 e) Using a synchronous, FOUR (4) bit counter with a synchronous LOAD shown in Figure.3, design a ModuloN counter with requirement stated below:. synchronously preset 4 on RESET 2. LOAD 4 on terminal count 3. [Gunakan pembilang segerak EMPAT (4)bit dengan masukan segerak pada Rajah.3. Rekabentuk satu pembilang ModuloN dengan syarat berikut:. Preset segerak pada 4 apabila RESET 2. Masukkan 4 apabila terminal pembilang 3.] [5 Marks/Markah] 4/4
4 Figure.4 Rajah.4 f) The serial adder in Figure.4 uses TWO (2) 4bit registers. Register A contains data of 0 and Register B contains data 0. The carry flipflop is initially reset to 0. Find the data contain in Register A; Register B; sum, carry out and input Z of the Full Adder for each of the FOUR (4) shifts (T, T2, T3 and T4. Assume T0 as initial state). [Penambah sesiri dalam Rajah.4 menggunakan DUA (2) daftar 4bit. Daftar M mempunyai data 0 dan Daftar N mempunyai data 0. Flipflop pembawa direset ke 0 pada keadaan awal. Dapatkan nilai di dalam Daftar M, Daftar N, flipflop pembawa dan hasil tambah Penambah Penuh selepas setiap anjakan bagi EMPAT (4) kali anjakan (T, T2, T3 dan T4). Anggap T0 sebagai keadaan awal.] [7 Marks/Markah] 5/4
Question 2 Soalan 2 5 A sequential circuit with two D flipflops D A and D B, two inputs X and Y, and one output Z, is specified by the following input equations: [Suatu litar jujukan terdiri dari dua flipflop D: D A dan D B, dua masukan: X dan Y, serta satu keluaran: Z, yang ditakrifkan oleh persamaanpersamaan masukan berikut: ] D A = XY + XA D B = X B + XA Z = XB a) Draw the logic diagram of the circuit. [Lukiskan litar logiknya.] [3 Marks/Markah] b) Derive the state table. [Terbitkan jadual keadaannya.] [7 Marks/Markah] c) Derive the state diagram. [Terbitkan rajah keadaannya.] [5 Marks/Markah] d) Produce a corresponding Algorithmic State Machine (ASM) chart. [Hasilkan carta Algorithmic State Machine (ASM) setaranya.] [5 Marks/Markah] 6/4
Question 3 Soalan 3 6 a) State TWO (2) types of Random Access Memory (RAM). Briefly explain how the information is stored in both of them. [Senaraikan DUA (2) jenis Ingatan Capian Rawak (RAM). Terangkan secara ringkas bagaimana maklumat disimpan di dalam keduadua ingatan tersebut.] b) Draw a basic block diagram for memory. [4 Marks/Markah] [Lukiskan gambarajah blok asas bagi ingatan.] [2 Marks/Markah] c) Design a TWO (2)bit arithmetic and logic circuit that will perform arithmetic and logic operations between two 2bit binary numbers A and B according to Table 3.. Use multiplexers, full adders and logic gates in your design. [Rekabentuk sebuah litar logik dan aritmetik DUA (2)bit yang dapat melaksanakan operasioperasi logik dan arithmetik di antara dua 2bit nombor binari A dan B berdasarkan Jadual 3.. Gunakan pemultiplex, penambah penuh dan get asas di dalam rekabentuk anda.] Table 3. Jadual 3. S 2 S S 0 Operation 0 0 0 0 0 0 0 0 0 0 0 0 [4 Marks/Markah] 7/4
PART B BAHAGIAN B 7 Answer any TWO (2) questions. [Jawab DUA (2) soalan sahaja.] Question 4 Soalan 4 a) Sketch a logic diagram of the hardware that implements the Register Transfer Language (RTL) given below. [Lakarkan gambarajah logik untuk perkakasan yang melaksanakan Bahasa Pemindahan Daftar (RTL) di bawah.] i) R0 R + R2 + ii) P2 : R5 R3 R4, P2P: R5 R6 R7 [8 Marks/Markah] MUX D Qi S S C S0 S0 0 D Qi C D i 2 3 D Qi+ GND CLOCK C Figure 4. Rajah 4. 8/4
8 b) For the Bidirectional Shift Register in Figure 4., produce a function table using mode selection inputs S and S 0. [Bagi Daftar Anjak Dwiarah pada gambarajah 4., terbitkan jadual fungsi menggunakan mod masukan pilihan untuk S and S 0.] [4 Marks/Markah] c) Refer to question 4(b) above, write equivalent Register Transfer Language (RTL) for the FOUR (4) functions of the Bidirectional Shift Register in Figure 4.. [Merujuk kepada soalan 4(b) ai atas, tuliskan EMPAT (4) Bahasa Pemindahan Daftar untuk fungsi Daftar Anjak Dwiarah pada gambarajah 4.] [4 Marks/Markah] Figure 4.2 Rajah 4.2 9/4
9 d) Shown in Figure 4.2, there are THREE (3) nbit 2to multiplexers, each with its own select signal. Each register has its own load signal. Identify the corresponding register transfers for the given control signals in Table 4.. Redraw Table 4. in answer sheets. [Bagi gambarajah 4.2, terdapat TIGA (3) nbit 2to pemultipleks, setiap satu mempunyai isyarat pemilih sendiri. Setiap daftar mempunyai isyarat masukan tersendiri. Kenalpasti pemindahan daftar yang berkaitan bagi isyaratisyarat kawalan yang diberikan dalam Jadual 4.. Lukis semula Jadual 4. dalam kertas jawapan. ] Table 4. Jadual 4. Select Load S0 S S2 L0 L L2 0 0 0 0 0 0 0 0 0 0 0 Register Transfer [4 Marks/Markah] 0/4
Question 5 Soalan 5 0 Refer to the Algorithmic State Machine (ASM) chart of a control unit in Figure 5.. There are four states and two inputs, X and Y. [Rujuk kepada rajah Algorithmic State Machine (ASM) bagi suatu pengawal pada Rajah 5.. Terdapat empat keadaan serta dua masukan, X dan Y.] reset S0 00 x 0 S 0 y 0 S3 S2 0 0 x y x 0 0 0 y Figure 5. Rajah 5. /4
a) Derive the corresponding state diagram. [Terbitkan rajah keadaan setaranya.] [6 Marks/Markah] b) Produce the corresponding state table. [Hasilkan jadual keadaan setaranya.] [5 Marks/Markah] c) Design the logic circuit for this controller using D flipflops. [Hasilkan litar logik setara bagi pengawal ini dengan menggunakan flipflop D.] [9 Marks/Markah] 2/4
Question 6 Soalan 6 2 a) With reference to the Control Word structure and the Encoding of Control Word table as specified in Appendix, obtain the 6bit control word to implement each of the following microoperations: [Merujuk kepada struktur Control Word dan jadual pengekod Control Word seperti di dalam Lampiran, dapatkan Control Word 6bit bagi melaksanakan setiap mikrooperasi yang berikut:] i) ii) [2 Marks/Markah] b) Use Appendix as reference. The width of registers shown is 8bits. Each register contains the same value as their register number (e.g. register R2 contains 02 in hexadecimal) before the execution of a control word. Determine the new register content as a result of the execution of each of the Control Words set given below: [Gunakan Lampiran sebagai rujukan. Saiz setiap daftar yang ditunjukkan adalah 8bit. Setiap daftar mengandungi nilai yang sama dengan nombor daftar (contohnya, daftar R2 mempunyai nilai 02 dalam heksadesimal) sebelum perlaksanaan Control Word. Tentukan kandungan baru daftar sebagai keputusan bagi perlaksanaan set Control Word yang diberikan di bawah.] i) Set A: 0 00 0 0 0 ii) Set B: 0 0 00 0 00 0 [4 Marks/Markah] d) Construct the complete block diagram for 256K x 6 RAM by using a decoder and the RAM chip in Figure 6.. [Bina gambarajah blok lengkap bagi 256K x 6 RAM dengan menggunakan penyahkod dan cip RAM dalam Rajah 6..] 3/4
3 Figure 6. Rajah 6. [4 Marks/Markah] ooooooooooo 4/4
4 Appendix Lampiran 6bit Control Word Structure Struktur 6bit Control Word Encoding of Control Word Table Jadual Pengekod Control Word