answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anika [276]
2 years ago
5

Compare the encryption algorithms found in s-tools: idea, mdc, des, and 3des.

Computers and Technology
1 answer:
grin007 [14]2 years ago
3 0
Are their answer chocies 

You might be interested in
Write a function named shout. The function should accept a string argument and display it in uppercase with an exclamation mark
Andrei [34K]

Answer:

void shout(String w) {

System.print.out(w + "!")

}

3 0
1 year ago
Add the following 2's complement binary numbers. Also express the answer in decimal. a. 01+ 1011b. 11+ 01010101c. 0101+ 110d. 01
kenny6666 [7]

Answer:

(a) 01 + 1011

Convert the two numbers into their 4-bit representation.

=> 01 = 0001

=> 1011

Addition of the two numbers (in their 2's complement form) gives the following:

0 0 0 1       ------------------> + 1 (in decimal)

<u>1  0 1  1 </u>      ------------------> - 5 (in decimal)

<u>1  1  0 0 </u>    -------------------> - 4 (in decimal)

Explanation for (a)

<em>01 or 0001</em>

Since the most significant bit is 0 (leftmost bit), it shows that it is a positive number. Therefore, it can be directly converted to its decimal representation as follows:

0001 = 0 x 2^{3} + 0 x 2^{2} + 0 x 2^{1} + 1 x 2^{0} = 1

0001 is + 1 in decimal.

<em>1011</em>

Its most significant bit(MSB) is 1 showing that it is negative.

Flipping all its bits and adding 1 to the result, will convert it to it's positive counterpart.

i.e 1011 => 0100 + 1 = 0101.

Converting the result (0101) to decimal gives

0101 = 0 x 2^{3} + 1 x 2^{2} + 0 x 2^{1} + 1 x 2^{0} = 5

1011 is -5 in decimal

<em>01 + 1011 or 0001+ 1011 = 1100</em>

The result (1100), of the addition of the two numbers, is a negative number as the MSB is 1.

Convert it to it's positive counterpart.

i.e 1100 => 0011 + 1 = 0100.

Converting the result (0100) to decimal gives

0100 = 0 x 2^{3} + 1 x 2^{2} + 0 x 2^{1} + 0 x 2^{0} = 4

Therefore, the result, 1100 is -4 in decimal.

===================================================

(b) 11 + 01010101

Convert the two numbers into their 8-bit representation since one of them is in 8-bit.

PS: Taking 11, its MSB is 1 showing that it is a negative number. Also, it's 8-bit representation will mean pre-padding it with ones(1s) rather than zeros as follows. In other words, pre-padding a 2's complement  number is done using its sign bit.

=> 11 = 11111111

=> 01010101

Addition of the two numbers (in their 2's complement form) gives the following:

  1  1  1  1  1  1  1  1       ------------------> - 1 (in decimal)

<u>   0 1  0 1  0  1 0 1 </u>      ------------------> + 85 (in decimal)

<u>1 0 1  0 1  0  1 0 0</u>    ------------------->  + 84 (in decimal)

Discard the carry-out bit (1) making the result 01010100

Explanation for (b)

<em>11 or 11111111</em>

Its MSB is 1 showing that it is negative.

Convert it to it's positive counterpart.

11111111 => 00000000 + 1 = 00000001

Converting the result (00000001) to decimal gives 1

11 or 11111111 is  - 1 in decimal.

<em>01010101</em>

Its MSB is 0 showing that it is also positive. Now, convert to decimal

01010101 = 85

01010101 is + 85 in decimal.

<em>11111111 + 01010101 = 01010100</em>

The result (01010100), is also positive as the MSB is 0. Now, convert to decimal.

01010100 = 84

Therefore the result (01010100) is + 84 in decimal.

===================================================

(c) 0101 + 110

Convert the two numbers into their 4-bit representations.

=> 0101 = 0101

=> 110 = 1110

Addition of the two numbers (in their 2's complement form) gives the following:

     0 1 0 1       ------------------> + 5 (in decimal)

<u>      1  1 1  0 </u>      -----------------> - 2 (in decimal)

<u>   1 0 0 1  1 </u>    -------------------> + 3 (in decimal)

Dicard the carry-out bit (leftmost bit) to get 0011 as result.

Explanation for (c)

<em>0101</em>

Since the MSB is 0 (leftmost bit), it shows that it is a positive number. Now, convert to decimal.

0101 =  5

0101 is +5 in decimal.

<em>110 or 1110</em>

Its MSB is 1 showing that it is negative.

Convert it to it's positive counterpart.

i.e 1110 => 0001 + 1 = 0010.

Converting the result (0010) to decimal gives

0010 =  2

1110 is -2 in decimal

<em>0101 + 110 = 0101+ 1110 = 0011</em>

The result (0011), is a positive number as the MSB is 0.

Converting the result (0011) to decimal gives

0011 = 3

Therefore, the result, 0011 is 3 in decimal.

===================================================

(d) 01 + 10

Convert the two numbers into their 4-bit representation.

=> 01 = 0001

=> 10 = 1110

Addition of the two numbers (in their 2's complement form) gives the following:

0 0 0 1       ------------------> + 1 (in decimal)

<u>1  1  1  0 </u>      ------------------> - 2 (in decimal)

<u>1  1  1  1 </u>    -------------------> - 1 (in decimal)

Explanation for (d)

<em>01 or 0001</em>

Since the MSB is 0 (leftmost bit), it shows that it is a positive number. Now convert to decimal.

0001 = 1

0001 is + 1 in decimal.

<em>1110</em>

Its MSB is 1 showing that it is negative.

Convert it to it's positive counterpart.

i.e 1110 => 0001 + 1 = 0010.

Converting the result (0010) to decimal gives

0010  = 2

1110 is -2 in decimal

<em>01 + 1011 or 0001+ 1110 = 1111</em>

The result (1111), is a negative number as the MSB is 1.

Convert it to it's positive counterpart.

i.e 1111 => 0000 + 1 = 0001.

Converting the result (0001) to decimal gives

0001 = 1

Therefore, the result, 1111 is -1 in decimal.

7 0
2 years ago
When should a developer begin thinking about scalability? 1 during the design phase 2during testing 3when traffic increases by 2
Tanzania [10]

Answer:

in my opinion 4

Explanation:

when the system is available to users

(sorry and thanks)

4 0
1 year ago
Write a loop that displays all possible combinations of two letters where the letters are 'a', or 'b', or 'c', or 'd', or 'e'. T
Dafna11 [192]

Answer:

for (char outerChar='a'; outerChar<='e'; outerChar++){

for (char innerChar='a'; innerChar<='e'; innerChar++){

cout << outerChar << innerChar << "\n";

}

}

3 0
1 year ago
BlockPy: #35.2) Animal Splits Write a function all_cats that consumes a comma-separated string of animals and prints whether all
maks197457 [2]

Answer:

def all_cats(data):

 dataArray = data.split(',')

 if(data==""):

   return True

 for i in dataArray:

   if('cat' not in i):

     return False

 

 return True

print(all_cats("gerbil,catfish,dog,cat"))

print(all_cats("cat,catfish"))

print(all_cats(""))

Explanation:

Step 1: define de function and the parameters

def all_cats(data):

Step 2: split the data by ,

dataArray = data.split(',')

Step 3 : validate if is an empty data and return true

if(data==""):

   return True

Step 4: Loop over de array data and validate if have cat in each data if not, then return false

for i in dataArray:

   if('cat' not in i):

     return False

Step 5 if have cat in each one return true

return True

Step 6 Validate with examples

print(all_cats("gerbil,catfish,dog,cat"))

print(all_cats("cat,catfish"))

print(all_cats(""))

6 0
1 year ago
Other questions:
  • Match each function with its possible output.
    7·2 answers
  • When workers demonstrate patience, are able to manage there emotions, and get along with other employees, which skills are being
    11·2 answers
  • Which references are updated when you copy the formula =$E6-MAX(H$1:J4)
    10·1 answer
  • Propane also known as LP gas, is often mixed with about _______ percent of other gases, such as butane, propylene, and mercaptan
    13·1 answer
  • In mathematics, the notation n! represents the factorial of the nonnegative integer n. The factorial of n is the product of all
    7·1 answer
  • When Jen is planning to upgrade to a monitor with a better resolution, what should she be looking for in the new monitor? machin
    11·1 answer
  • Which of the following is true with regard to defensive programming? Preconditions should never be visible to callers. Program c
    8·1 answer
  • Which of the following is not true about VOIP?
    9·1 answer
  • Write a client program that writes a struct with a privateFIFO name (call it FIFO_XXXX, where XXXX is the pid that you got from
    11·1 answer
  • If a class has member variables that are pointers, you must ensure that you implement ____.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!