Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Tutorial 6

Q.1.
It is considered in this exercise that the Excel spreadsheet
contains two binary numbers N1 and N2. N1 is on the first row,
from column 1 to column n, and N2 is on the second row, upto
the same column.
Write the add procedure which, given the size n of N 1 and N 2,
adds the two binary numbers N1 and N2 and stores the result
on the third row of the Excel sheet.

Q.2.
Write VBA procedure that takes 8-bit binary number and
computes 2s complement of that number

Q.3.
Write VBA procedure to compute subtraction of two 8-bit binary
numbers

Q.4.
We now consider that two rows in the Excel sheet represent
two binary numbers. Write a PlusGrandR function that takes
two line numbers as a parameter and returns the number of the
row that contains the largest of the two numbers (without going
through a conversion to base 10). Test the PlusGrandR
function.

You might also like