Computer Science, asked by hamzasalman2612, 8 months ago

Store the word Phone in computer memory starting from address 7003 where each letter needs one byte to store in memory

Answers

Answered by supreethacmsl
8

We are expected to store the word 'Phone' in computer memory, whose address starts from 7003 and a condition is given where each letter needs one byte to store in memory.

Explanation: We first created a table

Given Word  |  ASCII   |  Binary Code  |  Computer Memory

      P            

      h            

      o                

      n            

      e

  • The ASCII code of capital letters starts from 65.

        That is, the ASCII code of A is 65,

                      The ASCII code of B is 66 and so on.

The ASCII code of P is 80.

  • Similarly, ASCII code for small letters starts from 97.

        That is, the ASCII code of a is 97,

                    The ASCII code of b is 98 and so on.

The ASCII code of h=104, o=111, n=110, e=101

Given Word  |  ASCII   |  Binary Code  |  Computer Memory

      P                   80

      h                  104

      o                   111

      n                   110

      e                   101

     

Next, we find the binary code of each ASCII code.

HOW TO FIND THE BINARY CODE?

Basically, we convert the decimal number, that is 80, to a binary number.

What is a binary number?

  • Binary numbers are a sequence of bits, that is, 0's and 1's.
  • The base of binary numbers is 2.

∴ We divide the number 80, by 2,

2 | 80

2 | 40 -------- 0

2 divides 80, 40 times with 0 as the reminder and 40 can still be divided by 2,

2 | 80

2 | 40 -------- 0

2 | 20 -------- 0

2 | 10 --------- 0

2 |  5 --------- 0

2 |  2 --------- 1

2 |  1 ---------  0

2 |  0 --------- 1

We stop when we reach 0 or 1.

We've converted our decimal number to a binary code.

2 | 80               ∧

2 | 40 -------- 0  |

2 | 20 -------- 0  |

2 | 10 --------- 0  |

2 |  5 --------- 0   |

2 |  2 ---------- 1   |

2 |  1 ---------  0   |

2 |  0 --------- 1    |

- - - - - - - - - - - ->

The decimal number is taken from bottom to top as directed by the arrow in the above example,

That is, (80)_{10} = (0101 0000)_{2}

Let us input the binary code into the table,

Given Word  |  ASCII   |  Binary Code  |  Computer Memory

      P                   80         0101 0000

      h                  104

      o                   111

      n                   110

      e                   101

Activity: Find the binary codes of remaining ASCII codes and cross verify your answer with the one mentioned below.

Given Word  |  ASCII   |  Binary Code  |  Computer Memory

      P                   80         0101 0000

      h                  104         0110 1000

      o                   111          0110 1111

      n                   110          0110 1110

      e                   101          0111 0101

Given, computer memory starts from 7003, where each letter needs one byte to be stored in the memory.

Given Word  |  ASCII   |  Binary Code  |  Computer Memory

      P                   80         0101 0000             7003

      h                  104         0110 1000              7004

      o                   111          0110 1111                7005

      n                   110          0110 1110              7006

      e                   101          0110 0101             7007

On computers, it stores in this way,

Computer

Memory         7003     ||      7004      ||     7005         ||   7006    ||  7007

Address  

Binary         0101 0000 ||   0110 1000  ||  0110 1111 || 0110 1110 || 0110 0101

Code        

(#SPJ2)

Answered by talhamadnimuhammad
0

Answer:

Store the word "Phone" in computer memory starting from address 7003 where each letter needs one byte to store in the memory.

Similar questions