11-14-2018 10:18 AM
Hello
im new to labview I've only been on it for a week and now I got stuck on trying to identify the alphabets with corresponding numbers like
a=0
b=1
c=2
d=3
.
.
and so on
so that when a string is typed each alphabet can be converted to it's corresponding value depending on the description above like
Hello
will be
7 4 11 11 14
I've tried a lot of ways that I found to be close to my requirement as a solution including match pattern function but it doesn't do it
any idea?
Solved! Go to Solution.
11-14-2018 10:22 AM
Is this homework?
Show us one of the ways you tried that was close but didn't quite work. There are probably dozens of ways to do it. If you use byte array to U8, and subtract 64 from it, you are taking advantage of the ASCII table to solve the problem. (or subtract 96 if they are lower case letters.)
11-14-2018 10:23 AM - edited 11-14-2018 10:26 AM
Are you ignoring case (H = h)? Can you post what you have tried so far? How will you handle alpha-numerics? Is that a concern?
11-14-2018 10:32 AM
it is not a homework but a project in which im trying to hill encrypt a text to use the cipher as a key for one time pad to encrypt the same text again with it
and this is as close as i could figure out to it, but it only gives me the location of the alphabet i type in
11-14-2018 10:46 AM - edited 11-14-2018 10:47 AM
Put indicators on all your wires, or watch it run with highlight execution on. I don't think this will work if you are type in more than 1 letter. (not "alphabet" which is the word for the entire group of letters.)
But for a single letter, it will give you the results in a sort of Rube Goldberg way. (Well, you need to add 1 to the result.)
11-14-2018 10:49 AM
yes this works perfectly I just tried it thanks a lot