Questions tagged [hardware]

Programming questions related to the physical components of a computer. Please specify the model of your hardware in your question.

Computer hardware is the collection of physical elements that constitutes a computer system. Computer hardware refers to the physical parts or components of a computer such as the monitor, mouse, keyboard, computer data storage, hard drive disk (HDD), system unit (graphic cards, sound cards, memory, motherboard and chips), etc. all of which are physical objects that can be touched. Source: Wikipedia

Hardware by itself is very broad and there are many tags for specific hardware version which may be more appropriate. Eg, flash-memory, etc.

Tags related to implementing hardware,

  • - a language to create digital logic hardware.
  • - another language to create digital logic hardware.
  • - generic tag for digital logic programming languages.
  • - tag for software that simulates hardware (especially CPUS).
2966 questions
203
votes
17 answers

Multithreading: What is the point of more threads than cores?

I thought the point of a multi-core computer is that it could run multiple threads simultaneously. In that case, if you have a quad-core machine, what's the point of having more than 4 threads running at a time? Wouldn't they just be stealing time…
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
101
votes
5 answers

software threads vs hardware threads

What is the difference between software threads, hardware threads and java threads? Are software threads, java threads and hardware threads independent or interdependent? I am asking this because, I know Java threads are created inside a process…
Bhadri
  • 1,599
  • 5
  • 17
  • 14
86
votes
4 answers

How should I get started on writing device drivers?

I would like to learn how to write device drivers because I think it would be fun. I use a Mac OS X Macbook, but I also have an Ubuntu machine (running on a Mac Min). I am pretty familiar with C and currently am reading this book. I have found some…
Bjorn
  • 69,215
  • 39
  • 136
  • 164
69
votes
6 answers

C# little endian or big endian?

In the documentation of hardware that allows us to control it via UDP/IP, I found the following fragment: In this communication protocol, DWORD is a 4 bytes data, WORD is a 2 bytes data, BYTE is a single byte data. The storage format is little…
TimothyP
  • 21,178
  • 26
  • 94
  • 142
58
votes
15 answers

CUDA or FPGA for special purpose 3D graphics computations?

I am developing a product with heavy 3D graphics computations, to a large extent closest point and range searches. Some hardware optimization would be useful. While I know little about this, my boss (who has no software experience) advocates FPGA…
Fredriku73
  • 3,170
  • 4
  • 35
  • 32
57
votes
10 answers

What is the difference between a 32-bit and 64-bit processor?

I have been trying to read up on 32-bit and 64-bit processors (http://en.wikipedia.org/wiki/32-bit_processing). My understanding is that a 32-bit processor (like x86) has registers 32-bits wide. I'm not sure what that means. So it has special…
user485498
57
votes
18 answers

Why is number of bits always(?) a power of two?

We have 8-bit, 16-bit, 32-bit and 64-bit hardware architectures and operating systems. But not, say, 42-bit or 69-bit ones. Why? Is it something fundamental that makes 2^n bits a better choice, or is just about compatibility with existing systems?…
Joonas Pulakka
  • 36,252
  • 29
  • 106
  • 169
55
votes
7 answers

Why is writing to memory much slower than reading it?

Here's a simple memset bandwidth benchmark: #include #include #include #include int main() { unsigned long n, r, i; unsigned char *p; clock_t c0, c1; double elapsed; n = 1000 * 1000 *…
MWB
  • 11,740
  • 6
  • 46
  • 91
50
votes
14 answers

What are the ascii values of up down left right?

What are the ASCII values of the arrow keys? (up/down/left/right)
Laz
  • 6,036
  • 10
  • 41
  • 54
50
votes
13 answers

Get a unique computer ID in Python on windows and linux

I'd like to get an id unique to a computer with Python on Windows and Linux. It could be the CPU ID, the motherboard serial, ... or anything else. I looked at several modules (pycpuid, psi, ...) without luck. Any idea on how to do that?
darkpotpot
  • 1,321
  • 2
  • 11
  • 25
50
votes
6 answers

How to fast get Hardware-ID in C#?

I need in my program to tie a license to a hardware ID. I tried use WMI, but it still slow. I need, for example, CPU, HDD, and motherboard info.
guaike
  • 2,471
  • 9
  • 31
  • 42
50
votes
1 answer

what is a store buffer?

can anyone explain what is load buffer and how it's different from invalidation queues. and also difference between store buffers and write combining buffers? The paper by Paul E Mckenny…
harish reddy
  • 561
  • 1
  • 6
  • 6
47
votes
1 answer

Why do we use CPUs for ray tracing instead of GPUs?

After doing some research on rasterisation and ray tracing. I have discovered that there is not much information on how CPUs work for ray-tracing available on the internet. I came across and article about Pixar and how they pre-rendered Cars 2 on…
oodle600
  • 619
  • 1
  • 5
  • 8
45
votes
15 answers

Cool Hardware/Devices that can be programmed in .NET?

I'd love to start writting managed code for external devices and sensors. Are there any devices that come to mind that can be coded against using .NET? Any suggestions? Edit: The main thing I'm trying to do is learn how device programming works. …
Achilles
  • 11,165
  • 9
  • 62
  • 113
44
votes
7 answers

Is bit shifting O(1) or O(n)?

Are shift operations O(1) or O(n) ? Does it make sense that computers generally require more operations to shift 31 places instead of shifting 1 place? Or does it make sense the number of operations required for shifting is constant regardless of…
Pacerier
  • 86,231
  • 106
  • 366
  • 634
1
2 3
99 100