recategorized by
385 views
0 votes
0 votes
Suppose instead of a decoder with $n$ input bits ( $n$ is even) to access a memory of size $2^{n}$, one uses two decoders of input sizes $k$ bits and $(n-k)$ bits. Explain how these two decoders can be used to access the memory of size $2^{n}$.

Determine the value of $k$ that achieves minimum address decoding time. Justify your answer. Assume that the time complexity of the decoder is measured by the number of output lines of that decoder.
recategorized by

1 Answer

0 votes
0 votes

Assuming we use decoder/demux since we need the ENABLE to combine 2 decoders.

Let’s number bits from $(LSB \rightarrow MSB)$ as:

$\Rightarrow n-\text{bits} = \{\underline{b_0, b_1, …, b_k}, \underline{b_{k+1}, … b_n}\}$

 

Let’s use $decoder_1 = k \times 2^k$ for the $k$ least significant bits

i,e., $decoder_1$ is connected to bits $\{b_0, b_1, …, b_k\}$

Since $decoder_1$ will always be active,

$\text{ENABLE}=1$

 

Let’s use $decoder_2 = (n-k) \times 2^{n-k}$ for the $(n-k)$ most significant bits

i,e., $decoder_2$ is connected to bits $\{b_{k+1}, b_{k+2}, …, b_n\}$

Since $decoder_2$ will only be active when there is atleast one active MSB

$\text{ENABLE} = (b_{k+1} + b_{k+2} + … b_{n})$

 

At any given time, either one or both the decoders will be active.

Best Case:

There is no MSB active,  $\therefore$ only $decoder_1$ is active.

$T_n = \Omega(2^k)$

Worst Case:

There is atleast one active MSB,   $\therefore$ both $decoder_1, decoder_2$ is active

$T_n = O(max\{2^k , 2^{n-k}\})$

Average Case:

In average case, both the decoders will be active.

$T_n = \Theta(max\{2^k , 2^{n-k}\})$

 

To get minimum address decoding time, i.e., minimum worst/average time complexity,

we need to find the minimum value of $k , 0 \leq k \leq n$ such that

$max\{2^k , 2^{n-k}\}$ is minimum

which is possible when both are equal,

i.e., $2^k = 2^{n-k}$

$\Rightarrow k = n-k$

$\Rightarrow k = \frac{n}{2}$

Related questions

1 votes
1 votes
1 answer
1
admin asked Aug 8, 2022
434 views
Simplify the following Boolean function in product-of-sums form: $$ F(A, B, C, D)=\sum(0,1,2,5,8,9,10) . $$
0 votes
0 votes
0 answers
2
admin asked Aug 25, 2022
312 views
Consider the following state diagram of a sequential circuit, where each of a, b, c, d, e, f and g represents a state. Represent thestate diagram with minimum number of s...
1 votes
1 votes
3 answers
3
admin asked Aug 18, 2022
550 views
What does the following function compute for $x \neq 0?$float isi1(float x, int y) { if (y==0) { return 1; } else if (y>0) { return isi1(x,-y); } else { return isi1(x, y+...
1 votes
1 votes
1 answer
4
admin asked Aug 18, 2022
466 views
What will be the output of the following C program? Justify your answer. Negative numbers are represented in $2$'s complement,#include<stdio.h int main() { if (-~-1) prin...