Answer:
var findComplement = function(num) {
var start = false;
for (var i = 31; i >= 0; --i) {
if (num & (1 << i)) {//find the leftmost hightest bit 1 and start from there
start = true;
}
if (start) {
num ^= (1 << i);
}
}
return num;
};
var findComplement = function(num) {
var bits = num.toString(2);
var complement = '';
for(var i=0;i<bits.length;i++)
{
complement += (bits[i]==1?0:1);
}
return parseInt(complement,2);
};
Explanation:
The javascript code above would accept a number in the variable complemnt and using the parseint keyword, it converts it to a binary value of that number.
Each bit is converted from the least to the most significant bit, then it is returned to the find compliment function and converted back to an integer.
Answer:
The appropriate response will be "Public key".
Explanation:
- A public key would be created in something like such key encryption cryptography consisting incorporates asymmetric encryption of the keys algorithms.
- Those same keys have been utilized to transform a document to even such an unintelligible form. Decryption consists done using only a separate, however corresponding, secret address or private key.
I'm going have to go with with 1.b and 2.d hope this helps and I don't need help right now.
Answer:
A webpage is a class website and a website is a link where you can find useful information.
Explanation:
Please follow