Questions tagged [low-level]

In terms of a computer system, low-level refers to the components that appears lower in the stack of system layers.

In terms of a computer system, low-level refers to the components that appears lower in the stack of system layers.

679 questions
34
votes
26 answers

What is the best way to add two numbers without using the + operator?

A friend and I are going back and forth with brain-teasers and I have no idea how to solve this one. My assumption is that it's possible with some bitwise operators, but not sure.
user23126
  • 2,051
  • 5
  • 18
  • 16
33
votes
11 answers

Is there a way to enforce specific endianness for a C or C++ struct?

I've seen a few questions and answers regarding to the endianness of structs, but they were about detecting the endianness of a system, or converting data between the two different endianness. What I would like to now, however, if there is a way to…
vsz
  • 4,811
  • 7
  • 41
  • 78
30
votes
14 answers

What next generation low level language is the best bet when migrating a code base?

Let's say you have a company running a lot of C/C++, and you want to start planning migration to new technologies so you don't end up like COBOL companies 15 years ago. For now, C/C++ runs more than fine and there is plenty dev on the market for…
Bite code
  • 578,959
  • 113
  • 301
  • 329
27
votes
12 answers

How "low" does C go as a "low-level" language?

We often hear that C is a low-level language, but how low does it go? The lowest level I am aware of is memory management using pointers. Are there further levels I have yet to discover? What does "close to the hardware" mean? How "close to the…
eric.christensen
  • 3,191
  • 4
  • 29
  • 35
27
votes
7 answers

CPU Emulation and locking to a specific clock speed

If you had read my other question, you'll know I've spent this weekend putting together a 6502 CPU emulator as a programming exercise. The CPU emulator is mostly complete, and seems to be fairly accurate from my limited testing, however it is…
FlySwat
  • 172,459
  • 74
  • 246
  • 311
25
votes
4 answers

How to simulate mouse click from Mac App to other Application

I am trying to simulate mouse click on iphone simulator from macos App for that I am using CGEvents . the process id is 33554 for iPhone simulator let point = CGPoint(x: 500 , y:300) let eventMouseDown = CGEvent(mouseEventSource: nil, mouseType:…
Faisal Khalid
  • 620
  • 10
  • 22
24
votes
4 answers

What is an "internal address" in Java?

In the Javadoc for Object.hashCode() it states As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of…
Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
21
votes
8 answers

Which programming languages aren't considered high-level?

In informatics theory I hear and read about high-level and low-level languages all time. Yet I don't understand why this is still relevant as there aren't any (relevant) low-level languages except assembler in use today. So you…
hilo
  • 229
  • 1
  • 2
  • 5
20
votes
12 answers

Would you use num%2 or num&1 to check if a number is even?

Well, there are at least two low-level ways of determining whether a given number is even or not: 1. if (num%2 == 0) { /* even */ } 2. if ((num&1) == 0) { /* even */ } I consider the second option to be far more elegant and meaningful, and…
rmn
  • 2,386
  • 1
  • 14
  • 21
20
votes
6 answers

How are low-level libraries made?

When I go and make a C++ application I generally use libraries like SDL or WxWidgets and so on. But if I were to make a library would I need to use a library to make a library? Or can I make the entire library out of core C++ code, is this even…
DavidColson
  • 8,387
  • 9
  • 37
  • 50
19
votes
3 answers

It is possible to write less than 1 byte to a file

As far as I know the smallest unit in C is a byte. Where does this constraint comes from? CPU? For example, how can I write a nibble or a single bit to a file?
cyraxjoe
  • 5,661
  • 3
  • 28
  • 42
18
votes
1 answer

How does a memory map of a Windows process look like?

This might be a duplicate question. I wish to know how the memory map of a windows process look like? I am looking for details. Kindly provide links to blogs, articles and other relevant literature.
Bruce
  • 33,927
  • 76
  • 174
  • 262
18
votes
6 answers

Safer Alternatives to the C Standard Library

The C standard library is notoriously poor when it comes to I/O safety. Many functions have buffer overflows (gets, scanf), or can clobber memory if not given proper arguments (scanf), and so on. Every once in a while, I come across an…
Benjamin Pollack
  • 27,594
  • 16
  • 81
  • 105
16
votes
4 answers

Haskell-like type system in C

I was wondering, is it possible to integrate haskell's powerful type system into a language like C, and still be able to do efficent low level programming?
Ishihara
  • 1,099
  • 2
  • 11
  • 19
16
votes
3 answers

How to reduce default C++ memory consumption?

I have a server application written in C++. After startup, it uses about 480 KB of memory on x86 Linux (Ubuntu 8.04, GCC 4.2.4). I think 480 KB is an excessive amount of memory: the server isn't even doing anything yet, no clients have been…
Hongli
  • 18,682
  • 15
  • 79
  • 107
1
2
3
45 46