Answer:
Total Memory= 4 KB = 4096 bytes = 32768 bits
Explanation:
<em><u>1. Data lines are 8 From D0 to D7</u></em>
so
Total memory at single address locations is 8 bits.
<em><u>2. Address lines are 12 (A0 to A11)</u></em>
There are 12 address lines but 3 out 12 are for selction of chip or memory bank.
so only 9 pins are there to address the locations on one chip.
Total No. of address locations on single chip = 2^9 = 512 locations
as 1 location is 1 byte so total memory of single chip is 512 bytes.
<u><em>3. Total Memory Bank </em></u>
There are total 3 selection pins for memory bank.
so
Total chips = 2^3 = 8.
<em><u>4. Total Memory </u></em>
Total size of 1 chip = 512 bytes
Total size of 8 chip = 8x512 bytes = 4096 bytes = 4096/1024 kb = 4 kb
<em>So total memory of system is 4 Kb = 4096 bytes = 32768 bits</em>
Solution :
#include
#include
#include
//Converts to binary string.
* hexadecimalBinary(char* hexdec)
{
long = 0;
char *string = (sizeof(char) * 9);
while (hexdec[i]) {
//Simply assign binary string for each hex char.
switch (hexdec[i]) {
strcat(string, "0000");
break;
strcat(string, "0001");
break;
strcat(string, "0010");
break;
strcat(string, "0011");
break;
strcat(string, "0100");
break;
strcat(string, "0101");
break;
strcat(string, "0110");
break;
strcat(string, "0111");
break;
strcat(string, "1000");
break;
strcat(string, "1001");
break;
case 'A':
case 'a':
strcat(string, "1010");
break;
case 'B':
case 'b':
strcat(string, "1011");
break;
case 'C':
case 'c':
strcat(string, "1100");
break;
case 'D':
case 'd':
strcat(string, "1101");
break;
case 'E':
case 'e':
strcat(string, "1110");
break;
case 'F':
case 'f':
strcat(string, "1111");
break;
default:
printf("\nInvalid hexadecimal digit %c",
hexdec[i]);
string="-1" ;
}
i++;
}
return string;
}
int main()
{ //Take 2 strings
char *str1 =hexadecimalToBinary("FA") ;
char *str2 =hexadecimalToBinary("12") ;
//Input 2 numbers p and n.
int p,n;
scanf("%d",&p);
scanf("%d",&n);
//keep j as length of str2
int j=strlen(str2),i;
//Now replace n digits after p of str1
for(i=0;i<n;i++){
str1[p+i]=str2[j-1-i];
}
//Now, i have used c library strtol
long ans = strtol(str1, NULL, 2);
//print result.
printf("%lx",ans);
return 0;
}
As data travels further over a wavelength or frequency, the radiation type goes down.
<h3>What is an electromagnetic spectrum?</h3>
An electromagnetic spectrum can be defined as a range of frequencies and wavelengths into which an electromagnetic wave is distributed into.
In Science, the electromagnetic spectrum consist of the following types of energy from highest to lowest frequency and shortest to longest wavelength:
In this context, we can infer and logically deduce that as data travels further over a wavelength or frequency within the electromagnetic spectrum, the radiation type goes down.
Read more on electromagnetic spectrum here: brainly.com/question/23423065
#SPJ1