Fichas
Math stuff

Fichas del conjunto (11)
- 1what's 101011 in hexadecimal base101011 -> 0010 1011
-> 2 and b
->0x2b - 2base converting alg decimal to binary

- 3base converting alg base 10 to other base

- 4addition alg

- 5slow multiplication alg

- 6fast multiplication alg

- 7slow division alg

- 8How many operations are required for the addition alg?c1+c2N operations, i.e. a constant c1 plus a term that is proportional (with factor c2) to the number N of digits.
(some instructions executed once, then a for loop n times) - 9How many operations are required for the multiplication alg?two main steps, each having a pair of for loops, one nested inside the other.
“nesting” leads to N^2 passes through the inner loop.
instructions are executed N times before for loop
so c3 + c4N + c5N^2
The dominating term will be the N2 term. We will say that the algorithm runs in time O(N^2) - 10Addition for another base alg

- 11what is / in Java? what is %?integer (floor) division
remainder operator (NOT mod)
(a/b) ∗ b + (a % b) = a
Información
- Descripción
- Computer Science Fichas sobre Math stuff, creado por Virginie Gagné el 17/04/2022.
- Creado por
- Virginie Gagné
- Visitas
- 0
- Valoración