Questions tagged [cpu-word]

A word is the amount of data that a processor can fit in its general-purpose registers -- effectively the amount of data the processor can handle "at once". Programming-related questions concerning Microsoft Word should NOT use this tag - use the tag [ms-word] and/or [vba] instead. Questions on general usage of Microsoft Word are off-topic for Stack Overflow and should be asked on Super User instead.

A word is the amount of data a processor can fit into its general-purpose registers, which is a fast storage location for data or addresses of other locations in memory (e.g. other data needed for handling the current instruction).

In modern architectures, a word is typically in powers of 2. For instance, a 64-bit processor has a word size of up to 64 bits, whereas a 32-bit processor has room in its registers for up to 32 bits of data. As a counter example, the Burroughs B5000 had a word length of 48 bit.

Do not use this tag for questions about Microsoft Word or documents made with it. For these questions, use the tag, one of the version-specific , , tags, and/or the tag. Questions on the general usage of Microsoft Word are off-topic for Stack Overflow and should be asked on Super User instead.

1639 questions
127
votes
14 answers

What's the difference between a word and byte?

I've done some research. A byte is 8 bits and a word is the smallest unit that can be addressed on memory. The exact length of a word varies. What I don't understand is what's the point of having a byte? Why not say 8 bits? I asked a prof this…
user796388
72
votes
5 answers

What does it mean by word size in computer?

I have tried to get a grasp of what "word" means and I have looked in the wiki and the definition is vague. So my question is what is "word size"? Is it the length of the data bus, address bus?
kofhearts
  • 3,607
  • 8
  • 46
  • 79
57
votes
3 answers

How many bits does a WORD contain in 32/64 bit OS respectively?

Anyone has a definite answer? Someone says that on 32 bit OS a WORD means 16bit,true?
compiler
  • 4,143
  • 9
  • 36
  • 40
40
votes
2 answers

What are the sizes of tword, oword and yword operands?

What are the sizes of tword, oword and yword operands, as used in the NASM/YASM manual? And on a related note, is there a trick or underlying idea to these names? Is there a way by which bigger word sizes are given logical names? I know that while…
Daniel A.A. Pelsmaeker
  • 47,471
  • 20
  • 111
  • 157
26
votes
1 answer

C++ int vs long long in 64 bit machine

My computer has 64 bit processor and when I look for sizeof(int), sizeof(long), and sizeof(long long), it turns out that int and long are 32 bits, and long long is 64 bit. I researched the reason, and it appears that popular assumption telling that…
UserRR
  • 399
  • 1
  • 3
  • 16
20
votes
1 answer

What's the equivalent of WORD in C#?

I'm trying to access an unmanaged library and am lucky to have access to a comprehensive guide to the API. Unfortunately, I've no idea what the C# equivalent of C++'s WORD type is. Similarly, I've no idea what DWORD would be.
Tom Wright
  • 11,278
  • 15
  • 74
  • 148
20
votes
5 answers

How to find index of an exact word in a string in Python

word = 'laugh' string = 'This is laughing laugh' index = string.find ( word ) index is 8, should be 17. I looked around hard, but could not find an answer.
Khan
  • 223
  • 2
  • 3
  • 8
17
votes
2 answers

generating word cloud for items in a list in python

my_list=["one", "one two", "three"] and I am generating a word cloud for this list by using wordcloud = WordCloud(width = 1000, height = 500).generate(" ".join(my_list)) As I am converting all the items into string it is generating word cloud…
Pyd
  • 6,017
  • 18
  • 52
  • 109
17
votes
2 answers

Pass multi-word arguments to a bash function

Inside a bash script function, I need to work with the command-line arguments of the script, and also with another list of arguments. So I'm trying to pass two argument lists to a function, the problem is that multi-word arguments get…
haelix
  • 4,245
  • 4
  • 34
  • 56
16
votes
11 answers

Create acronym from a string containing only words

I'm looking for a way that I can extract the first letter of each word from an input field and place it into a variable. Example: if the input field is "Stack-Overflow Questions Tags Users" then the output for the variable should be something like…
dmschenk
  • 379
  • 1
  • 5
  • 19
16
votes
5 answers

How to Capitalize first letter only using CSS in each case

I want to Capitalize first letter only and other should be small using CSS String is: SOMETHING BETTER sOMETHING bETTER Something better but the result should be Something Better Is this possible using CSS? To Capitalize first letter I am using…
Kabir
  • 2,126
  • 5
  • 21
  • 24
15
votes
1 answer

First time learning assembly, is this saying a word size is 8-bytes?

When I break main it looks like the bold line is where i is being created and initialized. I think I'm going at this all wrong, I'm trying to examine x86_64 assembly from a book that is explaining x86. This seems weird and I'm pretty sure I just…
John Holly
  • 391
  • 1
  • 2
  • 12
14
votes
7 answers

Word comparison algorithm

I am doing a CSV Import tool for the project I'm working on. The client needs to be able to enter the data in excel, export them as CSV and upload them to the database. For example I have this CSV record: 1, John Doe, ACME Comapny (the…
disc0dancer
  • 9,185
  • 11
  • 36
  • 46
13
votes
2 answers

Find words and combinations of words that can be spoken the quickest

I'm a big fan of discovering sentences that can be rapped very quickly. For example, "gotta read a little bit of Wikipedia" or "don't wanna wind up in the gutter with a bottle of malt." (George Watsky) I wanted to write a program in Python that…
Parseltongue
  • 11,157
  • 30
  • 95
  • 160
13
votes
5 answers

Generate word combinations

For example this is my text : $str = 'buy new microsoft windows'; I explode text and list with array : Array ( [0] => buy [1] => new [2] => microsoft [3] => windows ) I want to generate words in array to something like this: buy…
Morteza
  • 2,143
  • 7
  • 37
  • 61
1
2 3
99 100