How input string is represented in magnetic tapes?
Asked Answered
H

2

0

I know that in turing machines, the (different) tapes are used for both input and output and for stack too. In a problem of adding 2 numbers using turing machine, the input is dealing with many symbols like 1,0,B(blank),+.

(Tough this questions is related to physics, I asked here since I thought they mayn't know about turing machines and their inputs.)

And my doubt is , If the input is BBBBB1111+111111BB, then in magnetic tape,

1->represented by North polarity(say).
0->represented by south polarity(say).
B->represented by No polarity.

Then, How '+' will be represented? I doesn't think that there will be some codes(like ASCII) for special symbols. Since the number and type of special symbols will be implementation dependent. Also special codes will make the algorithm more tedious.

or

Is the input symbol representation in tapes is entirely different from the above mentioned method?If yes, please explain.

Hickox answered 9/9, 2011 at 18:43 Comment(5)
You might want to read up on (at least) Manchester EncodingAccordion
A better question would be about the physics behind actually manufacturing the infinitely-long tape in the first place, rather than how you represent the data on it once you've done that.Pratincole
I thought magnetic tapes worked on Cannabis, pixie dust, and long beards... no?Practically
@Rowland Shaw ya, I saw that. But how it related to storing special symbols. It deals about an algorithm for storing the array of bits of 0's and 1'sHickox
@Eager_student Manchester encoding gives you logic bits; you then have your data encoding (including any parity/checksums, etc) - things like fixed operand lengths and how to encode operators etc.Accordion
B
2

You would probably do this by having each character encoded with multiple bits. For example:

B: 00
0: 01
1: 10
+: 11

Your read head would then have size two and would always move two steps to the left or the right when making a move.

Budd answered 9/9, 2011 at 18:57 Comment(2)
No there are more symbols (not only 4) like startsymbol,stacksymbols(in pushdown automata). so if we have more no of bits to encode ,then surely it will lead to a tedious format. isn't?And in the book they doesn't speak even a single line about this(as for as I know).Hickox
If you have n symbols, you only need lg n bits per symbol. Remember that these automata are of theoretical interest, not practical interest, and so the actual mechanism behind how they would work in the real world is not at all important. As an exMple, think about a nondeterministic PDA or TM - we haven't a clue how to build these in the real world, but they're theoretically very important.Budd
S
0
Symbol:  Representation
0:1 ; 1:11 ; 2:111 ; n:n+1 ; Blank:B
Scaife answered 23/3, 2012 at 2:8 Comment(1)
[Commenting because this post was flagged as a "late answer from a new StackOverflow user.] It is unclear how this answers the question; though the question itself is also pretty nebulous.Equiangular

© 2022 - 2024 — McMap. All rights reserved.