Question

In: Computer Science

how to spell darius in binary code ?

how to spell darius in binary code ?

Solutions

Expert Solution

"darius" corresponds to the following binary sequence:  01100100 01100001 01110010 01101001 01110101 01110011

A single character takes one Byte usually but it depends on the type of encoding. There are different types of encoding schemes like UTF-8, UTF-16, ASCII, etc.

Suppose the string is ASCII encoded which means each character takes 8 bits of storage.

Now, referring to the ASCII table (look it up if you aren't familiar with the table), the value of 'a' is 97 in integer. Convert this number to a binary number taking 8 bits

'a' = 97 = 01100001

Similarly, 'b' = 98 = 01100010

Putting values together like this, we can obtain the binary sequence for "darius"

ASCII Table


Related Solutions

I am having trouble with a C++ code that I'm working on. It is a spell...
I am having trouble with a C++ code that I'm working on. It is a spell checker program. It needs to compare two arrays, a dictionary, and an array with misspelled strings that are compared to the strings in the dictionary. the strings that are in the second array that is not in the Dictionary are assumed to be misspelled. All of the strings in the dictionary are lowercase without any extra characters so the strings that are passed into...
How can I fix this code to accomplish the goal of reading and writing on binary...
How can I fix this code to accomplish the goal of reading and writing on binary or text files? 3 import java.io.*; 4 import java.io.FileOutputStream; 5 import java.io.FileInputStream; 6 import java.util.Scanner; 7 8 public class ReadAndWrite implements Serializable 9 { 10 public static void main(String[] args) 11 { 12 boolean file = true; 13 Scanner inputStream; 14 PrintWriter outputStream; 15 FileInputStream inputBinary; 16 FileOutputStream readBinary; 17 FileInputStreamText writeText; 18 FIleOutputStreamText readText; 19 StringBuffer contents = new StringBuffer(); 20 Scanner keyboard...
(IN C) Write the code to manage a Binary Tree. Each node in the binary tree...
(IN C) Write the code to manage a Binary Tree. Each node in the binary tree includes an integer value and string. The binary tree is sorted by the integer value. The functions include: • Insert into the binary tree. This function will take in as parameters: the root of the tree, the integer value, and the string. Note that this function requires you to create the node. • Find a node by integer value: This function takes in two...
11= What is meant by "The sales spell"? Explain. Is there a Right spell? What is...
11= What is meant by "The sales spell"? Explain. Is there a Right spell? What is "No" Reflex that consumers has? Explain.
code in c++ using the code given add a hexadecimal to binary converter and add a...
code in c++ using the code given add a hexadecimal to binary converter and add a binary to hexadecimal converter #include <iostream> #include <string> #include<cmath> #include<string> using namespace std; int main() { string again; do { int userChoice; cout << "Press 2 for Decimal to Binary"<< endl; cout << "Press 1 for Binary to Decimal: "; cin >> userChoice; if (userChoice == 1) { long n; cout << "enter binary number" << endl; cin>>n; int decnum=0, i=0, remainder; while(n!=0) {...
Write the code to manage a Binary Tree. Each node in the binary tree includes an integer value and string.
Programming CWrite the code to manage a Binary Tree. Each node in the binary tree includes an integer value and string. The binary tree is sorted by the integer value. The functions include:• Insert into the binary tree. This function will take in as parameters: the root of the tree, the integer value, and the string. Note that this function requires you to create the node.• Find a node by integer value: This function takes in two parameters: the root...
1. Modify a binary search tree implementation code (that AVL tree code depends on) to print...
1. Modify a binary search tree implementation code (that AVL tree code depends on) to print out the data value for each node it encounters in the insert operation. Remember that the module AVL tree code gets part of its functionality from the BST type, since an AVL tree is a binary search tree, but adds some additional functionality. 2. Add code to the main method to meet the following requirements: (a) Create an AVL tree to hold names stored...
Java code for a binary tree that does the following:  Display a menu to the...
Java code for a binary tree that does the following:  Display a menu to the user and request for the desired option.  Based on the user’s input, request for additional information as follows: o If the user wants to add a node, request for the name (or ID) of the new node to be added as well as the name of the desired parent of that node.  If the parent node already has two children, the new...
Java code for a binary tree that does the following:  Display a menu to the...
Java code for a binary tree that does the following:  Display a menu to the user and request for the desired option.  Based on the user’s input, request for additional information as follows: o If the user wants to add a node, request for the name (or ID) of the new node to be added as well as the name of the desired parent of that node.  If the parent node already has two children, the new...
Write c code to determine if a binary number is even or odd. If it is...
Write c code to determine if a binary number is even or odd. If it is odd, it outputs 1, and if it is even, it outputs 0. It has to be less than 12 operations. The operations have to be logical, bitwise, and arithmetic.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT