Westonci.ca is the best place to get answers to your questions, provided by a community of experienced and knowledgeable experts. Connect with professionals on our platform to receive accurate answers to your questions quickly and efficiently. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly platform.

Convert this code into Java:

ELEMENTS = [1,663,8,2,4,1,22,66,20,122]
Loop I from 0 to 8
Loop K from 0 to (8 - I)
If ELEMENTS[K] > ELEMENTS[K+1] then
TEMP = ELEMENTS[k]
ELEMENTS[K] = ELEMENTS [K +1]
ELEMENTS[K + 1] = TEMP
End if
End loop
End loop
Output “Sorted Elements”
Loop E from 0 to 9
Output ELEMENTS [E]
End loop

Sagot :

Answer:

Convert text into binary. Computers store all characters as numbers stored as binary data. Binary code uses the digits of 0 and 1 (binary numbers) to represent computer instructions or text. Each instruction or symbol gets a bit string assignment. The strings can correspond to instructions, letters, or symbols.  In computing, these codes are used for encoding data.

This base-2 or binary numeral system is used in mathematics and computer science. The system represents values using just the two symbols. The values in the binary systems are typically called binary numbers.

In digital electronics and more specifically in digital electronic circuits that use logic gates (with values of 0 and 1), computers use the binary system internally. Computer based devices use the binary system as well with this including mobile phones.

Explanation: