From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2492/CH12/EX12.1/ex12_1.sce | 10 ++++++++++ 2492/CH12/EX12.2/ex12_2.sce | 26 ++++++++++++++++++++++++++ 2492/CH12/EX12.3/ex12_3.sce | 12 ++++++++++++ 2492/CH12/EX12.4/ex12_4.sce | 11 +++++++++++ 2492/CH12/EX12.5/ex12_5.sce | 17 +++++++++++++++++ 2492/CH12/EX12.6/ex12_6.sce | 12 ++++++++++++ 6 files changed, 88 insertions(+) create mode 100755 2492/CH12/EX12.1/ex12_1.sce create mode 100755 2492/CH12/EX12.2/ex12_2.sce create mode 100755 2492/CH12/EX12.3/ex12_3.sce create mode 100755 2492/CH12/EX12.4/ex12_4.sce create mode 100755 2492/CH12/EX12.5/ex12_5.sce create mode 100755 2492/CH12/EX12.6/ex12_6.sce (limited to '2492/CH12') diff --git a/2492/CH12/EX12.1/ex12_1.sce b/2492/CH12/EX12.1/ex12_1.sce new file mode 100755 index 000000000..0fe0436fd --- /dev/null +++ b/2492/CH12/EX12.1/ex12_1.sce @@ -0,0 +1,10 @@ +// Exa 12.1 +format('v',6) +clc; +clear; +close; +// Given data +RAMbit= 2*4;//K bit RAM IC chip +// The capacity of the memory chip, +Capacity = RAMbit*2^10;// in bits +disp(Capacity,"The capacity (or density) of the memory chip in bits is"); diff --git a/2492/CH12/EX12.2/ex12_2.sce b/2492/CH12/EX12.2/ex12_2.sce new file mode 100755 index 000000000..8aa9c5c06 --- /dev/null +++ b/2492/CH12/EX12.2/ex12_2.sce @@ -0,0 +1,26 @@ +// Exa 12.2 +format('v',6) +clc; +clear; +close; +// Given data +// (a) For 1024 number of bits +No_of_bits= 1024;// bits +Req_add_bits= log(No_of_bits)/log(2); +disp(Req_add_bits,"Address bits required for a memory that has 1024 number of bits"); + +// (b) For 256 number of bits +No_of_bits= 256;// bits +Req_add_bits= log(No_of_bits)/log(2); +disp(Req_add_bits,"Address bits required for a memory that has 256 number of bits"); + +// (c) For 4098 number of bits +No_of_bits= 4096;// bits +// 2^12= 4096, 2^13= 8192, where 4096<4098<8192 or 2^12<4098<2^13, hence +Req_add_bits= 13; +disp(Req_add_bits,"Address bits required for a memory that has 4098 number of bits"); + +// d) For 16384 number of bits +No_of_bits= 16384;// bits +Req_add_bits= log(No_of_bits)/log(2); +disp(Req_add_bits,"Address bits required for a memory that has 16384 number of bits"); diff --git a/2492/CH12/EX12.3/ex12_3.sce b/2492/CH12/EX12.3/ex12_3.sce new file mode 100755 index 000000000..e02ca9492 --- /dev/null +++ b/2492/CH12/EX12.3/ex12_3.sce @@ -0,0 +1,12 @@ +// Exa 12.3 +format('v',6) +clc; +clear; +close; +// Given data +memory = 16;// in K +memory= memory*1024;// in bits +// Number of bits of storage, +Req_add_bits= log(memory)/log(2); +disp(Req_add_bits,"Number of bits of storage is : ") +disp(Req_add_bits,"Number of lines in address bus is : ") diff --git a/2492/CH12/EX12.4/ex12_4.sce b/2492/CH12/EX12.4/ex12_4.sce new file mode 100755 index 000000000..6f27144bb --- /dev/null +++ b/2492/CH12/EX12.4/ex12_4.sce @@ -0,0 +1,11 @@ +// Exa 12.4 +format('v',6) +clc; +clear; +close; +// Given data +memory= 16;// in K +wordBit= 8; +// Number of address +N= log((memory/wordBit)*1024)/log(2); +disp(N,"The number of address lines is : ") diff --git a/2492/CH12/EX12.5/ex12_5.sce b/2492/CH12/EX12.5/ex12_5.sce new file mode 100755 index 000000000..c36c10cf2 --- /dev/null +++ b/2492/CH12/EX12.5/ex12_5.sce @@ -0,0 +1,17 @@ +// Exa 12.5 +format('v',8) +clc; +clear; +close; +// Given data +memory= 16;// in K +memory= memory*1024;// in bits +// Number of words +N1= memory; +disp(N1,"The number of words is : ") +N2= 32;// number of bits per word +disp(N2,"The number of bits per word is : ") +// Number of memory cell +N3= N2*memory; +disp(N3,"The number of memory cell is : ") + diff --git a/2492/CH12/EX12.6/ex12_6.sce b/2492/CH12/EX12.6/ex12_6.sce new file mode 100755 index 000000000..2bf383dba --- /dev/null +++ b/2492/CH12/EX12.6/ex12_6.sce @@ -0,0 +1,12 @@ +// Exa 12.6 +format('v',9) +clc; +clear; +close; +// Given data +N1= 16;// address input +inputs= 4; +outputs= 4; +// Total number of memory cells +N2= 2^N1*2^inputs; +disp(N2,"Total number of memory cells is : ") -- cgit