Answer:
public class Brainly
{
public static void main(String[] args)
{
BinaryConverter conv = new BinaryConverter();
String binStr = "01001101";
System.out.print(binStr + " in decimal is "+conv.BinToDec(binStr));
}
}
public class BinaryConverter
{
public int BinToDec(String binStr)
{
int d = 0;
while(binStr.length() > 0)
{
d = (d << 1) + ((binStr.charAt(0) == '1') ? 1: 0);
binStr = binStr.substring(1);
}
return d;
}
}
Explanation:
The program "eats" the string from left to right, and builds up the integer representation in variable "d" on the go. While there are digits left, it shifts the previous result to the left and sets the least signficant bit to 1 only if the corresponding string character is a 1.
Answer:
Sheave wheel and hoist cable
Explanation:
The sheave wheel is a pulley wheel that sits above the mine shaft. The hoist cable passes over the sheave wheel and then down the shaft of the mine. The sheave wheel reduces the sliding friction of the mine cable. The head frame is the structure that supports the sheave wheel.
HTML uses tags to help the computer know what different pieces of content in the web page actually are. Right now we've only learned how to tell the computer that some text is a paragraph, or that part of your website is the body. We've already seen how that affects the way our web pages look and are structured.
(I don't know how it should be organized, but hope this helped)
Answer:
PSD (Photoshop Document)
Explanation:
PSD (Photoshop Document) is an image file format native its one of Adobe's popular Photoshop Application. PSD files are commonly used for containing high quality graphics data.
Answer:
"Quotes"
Slashes \//
How '"confounding' "\" it is!
Explanation:
The question above is testing your knowledge of the "\" escape sequence, This escape sequence is used to introduce special formatting to the output of the System.out.print function in Java.
It can be used to introduce a new line \n
It can also be used to introduce a tab indentation \t
As in the question above it is used to introduce double quotes "" in this case \"
Also as we see the question above it can still be used to place backlashes to an output in this case we use two backlashes \\. The first is the escape sequence, the second \ gets printed out.