This is a little tricky. I would say reserve. It would help to know what programming language and class this is for because a lot of times when you create an array variable the memory is put onto the stack and you as the programmer do not reserve memory space. Now on the other hand, if you are programming in C and you want to create an array variable and put it on the heap then you would reserve memory space on the heap.
Answer:
Let f be a function
a) f(n) = n²
b) f(n) = n/2
c) f(n) = 0
Explanation:
a) f(n) = n²
This function is one-to-one function because the square of two different or distinct natural numbers cannot be equal.
Let a and b are two elements both belong to N i.e. a ∈ N and b ∈ N. Then:
f(a) = f(b) ⇒ a² = b² ⇒ a = b
The function f(n)= n² is not an onto function because not every natural number is a square of a natural number. This means that there is no other natural number that can be squared to result in that natural number. For example 2 is a natural numbers but not a perfect square and also 24 is a natural number but not a perfect square.
b) f(n) = n/2
The above function example is an onto function because every natural number, lets say n is a natural number that belongs to N, is the image of 2n. For example:
f(2n) = [2n/2] = n
The above function is not one-to-one function because there are certain different natural numbers that have the same value or image. For example:
When the value of n=1, then
n/2 = [1/2] = [0.5] = 1
When the value of n=2 then
n/2 = [2/2] = [1] = 1
c) f(n) = 0
The above function is neither one-to-one nor onto. In order to depict that a function is not one-to-one there should be two elements in N having same image and the above example is not one to one because every integer has the same image. The above function example is also not an onto function because every positive integer is not an image of any natural number.
Answer:
10010101 + 00101110 = 1 1 0 0 0 0 1 1 , 10010101 - 00101110 = 0 1 1 0 0 1 1 1,
01101101 + 01110011 = 1 1 1 0 0 0 0 0 , 01101101 - 01110011 = - 1 1 1 1 1 0 1 0
Explanation:
10010101 + 00101110 = 1 0 0 1 0 1 0 1
+ <u>0 0 1 0 1 1 1 0</u>
<u>1 1 0 0 0 0 1 1</u>
In binary, 1 plus 0 is 1, but 1 plus 1 ( which conventionally is two) is divided by 2 and the result is carried-out, while the remainder is used as the answer.
10010101 - 00101110 = 1 0 0 1 0 1 0 1
- <u>0 0 1 0 1 1 1 0</u>
<u>0 1 1 0 0 1 1 1</u>
Subtraction in Binary calculation, a borrow to a 0 value is equal to two, this law is implemented in a case where 1 is subtracted from 0 ( which is impossible).
01101101 + 01110011 = 0 1 1 0 1 1 0 1
+ <u>0 1 1 1 0 0 1 1</u>
<u>1 1 1 0 0 0 0 0</u>
<u />
01101101 - 01110011 = 0 1 1 0 1 1 0 1
- <u>0 1 1 1 0 0 1 1</u>
- <u>1 1 1 1 1 0 1 0</u>
At the end of the subtraction, if the value subtracted from in less than the subtracted number, two is borrowed and the result becomes negative or signed.