General Question

Ltryptophan's avatar

After I type a character does it have it's own digital identity?

Asked by Ltryptophan (12091points) September 1st, 2011

When I type (a) for instance. That letter now exists in a particular place being held together by the memory of my computer which is acting in a text program within my browser (if I understand correctly). Now I have gone back and erased that (a) above ten times, and replaced it each time with the exact same letter.

Was this happening every instant that the (a) sat on the screen anyway? Is that (a) a particular set of 1’s and 0’s? What is its permanence like?

Say I typed it in a word document, and then saved it. When I reload the document on a later date is it the same (a) or is there something new about it? I am not sure how to ask this question…maybe you can help.

Observing members: 0 Composing members: 0

11 Answers

gorillapaws's avatar

“a” is typically represented by the value 97 in the computer, this can be expressed as 61 in hex which is typically how computer scientists talk about these types of values. In binary it’s “0110 0001”. If you save the “a” to disk in the form of a file, then those binary bits are written into your storage location from memory, and if you quit the program then the memory that was holding those bits is flagged as available to the operating system and can be overwritten by other programs running. When you re-launch the program, it will probably have a function that get’s called at launch that will load in your saved file, and will allocate a chunk of memory to hold those bits.

As far as erasing and replacing goes, it really depends on how the programer wrote the program. Typically, each keystroke (e.g. hitting the “a” key or the “delete” key) will activate a function that will extend the contents of the text box’s representation—called a string see this: http://en.wikipedia.org/wiki/String_(computer_science)#String_datatypes.

Basically all text in a computer is like a long list of numbers with each number corresponding to a letter of the alphabet, symbol, or special characters (such as creating a new line). Here’s a list of the ASCII table which is an older system of representing letters as binary numbers, newer systems have been invented that take advantage of machines having much more memory, and allows for better handling of things like asian characters. UTF-8 is the preferred encoding these days.

Ltryptophan's avatar

So if I type an (A) and then move it. Let’s say I copy and paste that (A). Is it still the same (A)???

Or has a new (A) been formed during the move and the old one replaced. Does the character have a walled identity?

gorillapaws's avatar

Copy/pasting is a separate mechanism. Copying will either make a reference to the existing “A” or duplicate it into memory (this really depends on several different factors such as whether you’re copy/pasting between 2 different programs or the same one, what OS you’re running, and how the programmers decided to code the program itself. Every character-sized chunk of memory (called a byte) has a physical address. It’s common for programs to say, “hey get whatever’s in memory at location xxxxx” instead of actually duplicating the content. This is especially so when talking about a larger chunk of memory, so it might say “hey grab that whole paragraph of letters that starts at memory location yyyyy and continue reading until you hit this invisible special character ’\0’ ”.This is often why when you change something in one place it changes everywhere else (because they were all pointing to the same thing).

I’m not sure what you mean by “walled identity”, could you clarify what you mean?

Ltryptophan's avatar

Ok, so if I type the word cat and the word bat. Then I copy and paste the (a) from bat onto the position where there is an (a) in cat is it the same (a) that was in bat, or is it now neither the a that was in bat or cat?

flutherother's avatar

I would guess it is physically the same as it requires no change. (a)‘s can be physically different and mean the same thing. I have hundreds, if not thousands of (a)‘s on my computer each on a different place on my hard drive. Each means the same, though they can be modified by the context eg in mad and made the (a) sounds different.

gorillapaws's avatar

So if you have a text box with: “cat bat” in it then there will be a string object in the program that refers to the content of the box. The string is like a list so it would look like this:

Slot 0: c (represented as 0110 0011)
Slot 1: a (represented as 0110 0001)
Slot 2: t (represented as 0111 0100)
Slot 3: ” ”(represented as 0010 0000)
Slot 4: b (represented as 0110 0010)
Slot 5: a (represented as 0110 0001)
Slot 6: t (represented as 0111 0100)
Slot 7: \n (represented as 0000 0000)—this marks the end of the string

When you copy the “a” in “cat” there is a pasteboard object that will execute a function that copies the contents of slot 1 into the pasteboard’s memory, later when you paste it overwriting the “a” in “bat”, I believe it first will change the string to “cat bt”, and then insert into the slot5 of the string the value for “a”. It’s also possible that the programmer (although unlikely) that there is a special test in the program that checks for replacing with identical content and will do nothing in such cases. It really depends on how they wrote the code.

Ltryptophan's avatar

@gorillapaws probably as comprehensive an answer as can be given. Now allow me to look it directly in the mouth:

Let’s say I have a set of blocks. There are six: c, a, t, b, a, t. After spelling cat and bat with the blocks I remove the a from bat place it between c and t discarding the a block from cat. In this case the a that is now helping to spell cat is the exact same a that was in the word bat. It is not a representation, or copy; it is that self same a.

Does this happen with digital characters?

gorillapaws's avatar

@Ltryptophan no, because the physical things that make up the digital characters “the binary 1’s and 0’s are magnetic (in the case of hard drives) and filled/empty capacitors (in the case of RAM).

gorillapaws's avatar

To put it another way, if you think of a computer’s memory and hard disks as 2 massive grids of billions of lightbulbs each bulb having it’s own switch, things are represented by switching the bulbs on and off, not by physically moving the bulbs to different locations in the grid.

Response moderated (Off-Topic)
Response moderated (Off-Topic)

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther