# Math for Developers – Exercise ```Math for Developers – Exercise
The goal of this exercise is to practice converting numbers from decimal to binary numeric system. Your
task is to convert your name to binary using the given ASCII table.
Problem 1. Convert the characters of your name into decimal values
Your first task is to convert each of your characters to integer numbers using the given ASCII table.
A
B
C
D
E
F
G
H
I
J
K
L
M
65
66
67
68
69
70
71
72
73
74
75
76
77
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
78
79
80
81
82
83
84
85
86
87
88
89
90
a
b
c
d
e
f
g
h
i
j
k
l
m
97
98
99 100 101 102 103 104 105 106 107 108 109
n
o
p
q
r
s
t
u
v
w
x
y
z
110 111 112 113 114 115 116 117 118 119 120 121 122
E.g. the name Alex is converted to: 65, 108, 101, 120. The character 'A' has a numeric value of 65, the
character 'l' has the numeric value of 108 and so on. Keep in mind that lowercase and uppercase letters
matter!
Problem 2. Converting the numbers from decimal to binary system
The numbers you get after converting your name are in decimal numeric system. In order to convert a
decimal number to its binary format you need to implement the following algorithm:
1.
2.
3.
4.
5.
Divide the decimal number by 2.
We get the remainder of the operation and write it down.
If the product of the division is a number different than 0 we go back to point 1.
If the product of the division is equal to 0 we stop.
After we have finished the division, we take the remainders and arrange them in the following
manner:
The number we want to convert is 23.
23/2 = 11 and (1) remainder
11/2 = 5 and (1) remainder
5/2 = 2 and (1) remainder
2/2 = 1 and (0) remainder
1/2 = 0 and (1) remainder
Now we take the produced remainders and arrange them by taking the last remainder then the
second last, etc. and placing them one next to the other from left to right: 10111.
The final number 10111 is the binary representation of the number 23 in decimal system.
Problem 3. Implement the algorithm for each number
After we have converted our name into numbers we need to convert each number to binary. After we do
that we get our full name with zeros and ones.
*
E.g. the name Alex becomes:
01000001 01101100 01100101 01111000
* You can check your solution here
{"ft_lang_label":"__label__en","ft_lang_prob":0.8289414,"math_prob":0.9781927,"size":2394,"snap":"2020-45-2020-50","text_gpt3_token_len":669,"char_repetition_ratio":0.1334728,"word_repetition_ratio":0.058333334,"special_character_ratio":0.33082706,"punctuation_ratio":0.08598131,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9961532,"pos_list":[0,1,2],"im_url_duplicate_count":[null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-11-26T21:48:00Z\",\"WARC-Record-ID\":\"<urn:uuid:b0d17c13-ed8f-4486-b884-e25a8ce99a1d>\",\"Content-Length\":\"57535\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d0f07c9f-8698-4aaa-8ef4-780e71934ecf>\",\"WARC-Concurrent-To\":\"<urn:uuid:22d59ced-31f7-45d6-8fa1-28b8b6f22aba>\",\"WARC-IP-Address\":\"104.24.124.188\",\"WARC-Target-URI\":\"https://studylib.net/doc/7083494/math-for-developers-%E2%80%93-exercise\",\"WARC-Payload-Digest\":\"sha1:PVWMWIFS3V6HRPRRWF74RNCSVIV7T3D7\",\"WARC-Block-Digest\":\"sha1:3DWLFWPI3QYG2XGXGXBJLWPNAY3BN2I3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141188947.19_warc_CC-MAIN-20201126200910-20201126230910-00699.warc.gz\"}"}