Questions tagged [low-level]

Questions concerning low-level aspects of a system: programming close to the underlying details and hardware.

Filter by
Sorted by
Tagged with
-2 votes
0 answers
27 views

Design pattern and middleware solution [duplicate]

I am a junior developper using Intersystem Ensemble in my job and i'm wondering how does design pattern relate to that kind of software ? For exemple, i've been given the following task : Check for a ...
  • 1
-1 votes
2 answers
269 views

Payment Processor using polymorphism?

I am writing a payment Processor class, then will take different payment objects in input and talks to external services to process payment.My class is designed using polymorphism as follow: public ...
  • 101
1 vote
4 answers
466 views

Using Enum to represent VehicleType in cab Booking system

I am working on low level design of cab booking type of system and feeling stuck at modelling Vehicle in Booking class.I came up with following design. Class Vehicle { } ...
  • 81
0 votes
2 answers
257 views

Object Oriented Design for chess

Recently I came across some article on Chess OOPS design.Following is some snippet from it: public class Chess { ChessBoard chessBoard; Player[] player; Player currentPlayer; List<...
2 votes
3 answers
256 views

Enums or Multiple Inherited Classes

I am reading about OOD and came across Parking lot design problem.Parking lot has parking floors which has parking spots.The parking spot class looks as follow: public enum ParkingSpotType { ...
-1 votes
1 answer
278 views

Do other languages have variables shared between threads?

I guess it would be too complex for Node.js / JavaScript to leverage, but I've been working with clusters in node to break big tasks down so all cores can work at once but the inter-process messaging ...
  • 3,843
5 votes
1 answer
409 views

How exactly are drivers developed, distributed, & utilized?

If operating systems use 'drivers' to communicate with external devices, does that then mean that OS's (like windows, linux, & osx) have to come prepackaged with drivers for every single external ...
  • 81
0 votes
4 answers
765 views

Why do many programming languages and applications use integer instead of floating point to represent time?

In my experience, the value of time mostly is represented by integer number, by programming languages (C/Java/Golang/Javascript(*)...), and by databases (MySQL, Postgres...), exceptions maybe some GUI/...
  • 747
17 votes
5 answers
2k views

How to comprehend abstraction in code?

When looking at a new codebase I like to start from a bottom-up approach. Where I comprehend one file and then move up to the next abstraction. But often times I find myself forgetting what the ...
7 votes
3 answers
1k views

How can arithmetic, like a bit shift, avoid branching?

I'm learning to program the Game Boy Advanced (an old Nintendo console.) I was reading one of the best tutorials about it and it said this about how branching can be done with arithmetic. [To ...
user avatar
58 votes
6 answers
36k views

Why do many functions that return structures in C, actually return pointers to structures?

What is the advantage of returning a pointer to a structure as opposed to returning the whole structure in the return statement of the function? I am talking about functions like fopen and other low ...
  • 2,247
82 votes
7 answers
16k views

Why are bit masks called "masks" and what purpose do they serve?

Why are "bit masks" called like this? I know that they are mainly used for bitwise operations and the usage of bit masks is more efficient than the usage of separate variables. However my question ...
  • 2,247
11 votes
3 answers
2k views

Why do compilers typically only generate executables for the platform they are installed on?

I'm a C++ developer and in an attempt to better understand cross-platform development, I'm trying to get a better understanding of some implementation details of compilers and how exactly they create ...
  • 459
0 votes
2 answers
242 views

Where to start when creating a programming language? [closed]

I'm actually a programmer on a few languages, but I realized I really didn't know much how the computer works on a deeper level. So I thought a good idea to discover and learn how does it work was to ...
user avatar
4 votes
1 answer
3k views

Is OpenGL just badly designed?

I have been using OpenGL and OpenGL ES for a long time, and I know them pretty well. They're also really, really annoying to use, and I haven't really seen this discussed anywhere. Here are some ...
  • 89
4 votes
4 answers
4k views

Learning languages: high-level first, or low-level first? [closed]

Whenever I learn about a high-level language I want to learn about, part of me says, "I should probably learn the lower-level language it's built upon to really master it". For example, Ruby => ...
  • 299
11 votes
7 answers
912 views

What principles are learned from C that can't be learned in higher level languages? [closed]

I believe C is a good language to learn the principles behind programming. What do you stand to learn in lower level languages that are "magicked" away from high level ones, such as Ruby?
  • 231
4 votes
5 answers
592 views

How are mixed, sizeless lists implemented in higher level languages?

Most higher level (or scripting) languages out there have data structures that can hold different types of data (like numbers, strings and even functions) in the same structure, and you can also add ...
0 votes
4 answers
2k views

Why use a higher level language? [closed]

A question that gets asked a lot is "Why use low level languages if you can code in high level languages more easily (and often tersely)?". I think the answers are fairly straight forward here, being ...
9 votes
5 answers
9k views

What does it mean to declare a volatile variable?

Many low level programs use the volatile keyword for types for memory mapping and such, however I'm sort of confused as to what it REALLY does in the background. In other words, what does it mean ...
  • 255
57 votes
4 answers
7k views

Development process used for the code on Apollo 11 missions?

The Apollo missions had technology no more complicated than a pocket calculator. From link here, there's an information about Apollo Guidance Computer (AGC) The on-board Apollo Guidance Computer (...
  • 1,617
4 votes
1 answer
47k views

Is C programming language low level or high level? [duplicate]

What do you think, is C programming language low or high level? There are some information, in one is said that C is low level, and another C is high level? When I read book of Dennis Ritchie and ...
  • 163
8 votes
4 answers
4k views

What are the key differences between low-level C development and higher level OOP development? [duplicate]

I have been using high-level OOP language (like C# and/or Java) for quite some time. I know patterns like the gang of four, can read and write code reasonably well and am considered a senior by his ...
2 votes
1 answer
133 views

Does grouping threads by task improve performance?

This is kind of a lazy question on my part, since I gave up after trying only a few google terms. But when I read about multi-threaded performance, I read about context switching being bad for ...
  • 769
5 votes
6 answers
7k views

What are memory addresses? [closed]

I have more or less 0 knowledge in low-level topics, so forgive my possible ignorance. I know that in languages such as C, pointers hold 'memory addresses', i.e. strings (or binary data?) written in ...
  • 21k
12 votes
4 answers
2k views

Is there any danger in writing raw bytes to a file? [closed]

I'm working through a problem in Programming Pearls -- specifically, the implementation of a program which sorts a file containing, at most, 10,000,000 integers (Column 1, Problem 3). Since the book ...
1 vote
1 answer
190 views

Is my 'variable-storing area' basically a 'heap'?

I'm planning to implement a simple VM/interpreter kind of thing for a simple language I'm making. The compiler of the language emits mostly stack-oriented instructions to be executed by the VM. The ...
  • 21k
0 votes
3 answers
1k views

How does a stack VM manage with only one stack?

Lately I've been asking a lot of questions here about VMs. Here's another one: I understand that often stack based VMs use only one stack - the call stack - for everything. E.g. it is also used for ...
  • 21k
6 votes
3 answers
2k views

What would the register-machine bytecode for this code look like?

I hope this kind of question isn't off-topic on this site. I'm finally getting the hang of what a stack based machine is, and how to compile code for it. For example, the following code: 2 * 5 + 1 ...
  • 21k
3 votes
2 answers
392 views

Do VMs use one stack for everything? [duplicate]

Most VMs have a "call stack" to keep track of where to return from each function that was called. This is often simply regarded as "the stack". However often a stack is needed for operations that ...
  • 21k
5 votes
1 answer
2k views

How do VMs implement function calling?

I'm reading a compiler textbook that compiles to some form of assembly. Since I don't know this assembly language I decided to invent my own simple "assembly language" and implement a basic "virtual ...
  • 21k
24 votes
3 answers
17k views

Why do executables depend on the OS but not on the CPU?

If I write a C program and compile it to an .exe file, the .exe file contains raw machine instructions to the CPU. (I think). If so, how is it possible for me to run the compiled file on any computer ...
  • 21k
-1 votes
2 answers
232 views

What interface does python use to implement sockets?

When I programmed in python, I believe I interfaced with the transport layer using sockets. If python was programmed by humans, they must have used an interface that was "lower" than sockets, to ...
35 votes
5 answers
23k views

What is the absolute minimum set of instructions required to build a Turing complete processor

I have a general idea of how the processor handles instructions but spend my time working in mostly high level languages. Maybe somebody who works closer to the iron can provide some valuable insight. ...
  • 5,705
-1 votes
2 answers
934 views

Difference between a pointer and a reference? [duplicate]

In Java and other high-level languages, a reference leads to an object. In C++, as far as I know, a pointer can also lead to an object. So what's the difference between a reference leading to an ...
  • 1,217
1 vote
1 answer
849 views

Next power of 2 for a number (in search for better "bit-twiddling" way)

I just wonder if there exists better (i.e. faster?) way to get the next power of 2 for a given number than the following one (maybe some better sort of "bit-twiddling" hack is possible?) ... static ...
  • 141
1 vote
3 answers
3k views

Question about moving to embedded systems [closed]

I currently work as a .net developer and have coming up to 3 years experience in the industry as well as a degree in computer science specifically software engineering (I know that means nothing but ...
  • 23
44 votes
10 answers
16k views

Why not have a High Level Language based OS? Are Low Level Languages more efficient?

Without being presumptuous, I would like you to consider the possibility of this. Most OS today are based on pretty low level languages (mainly C/C++) Even the new ones such as Android uses JNI & ...
  • 559
18 votes
4 answers
7k views

Why do some programmers categorize C, Python, C++ differently? - regarding level

I am taking an introductory course on python and the instructor says that python is a high level language and C and C++ are low level languages. It's just confusing. I thought that C, C++, Python, ...
3 votes
1 answer
384 views

Books/sources on inner workings of JavaScript [duplicate]

When I started studying C++ a couple of years ago, a lot of the books and texts I read did a very thorough job of explaining, how the code written would translate into concrete operations in the ...
  • 149
10 votes
4 answers
5k views

Memory management for fast message passing between threads in C++

Suppose there are two threads, which communicate by asynchronously sending data messages to each other. Each thread has some kind of message queue. My question is very low level: What can be expected ...
11 votes
3 answers
25k views

How would one go about reading memory from a process? Is it different by OS?

As an experienced web-developer, but a novice "low level" programmer, this stuff is sort of voodoo to me still. I'm curious about how one would even begin to go about finding a memory block, and then ...
  • 547
9 votes
4 answers
9k views

A good interpreted language for a small embedded project [closed]

I have an mbed microcontroller which has a small ARM Cortex M3 on it. Basically, my effective resources for the project are ~25 KB of RAM and ~400 KB of Flash. For I/O I'll have a PS/2 ...
  • 22.6k
75 votes
11 answers
10k views

Why are cryptic short identifiers still so common in low-level programming?

There used to be very good reasons for keeping instruction / register names short. Those reasons no longer apply, but short cryptic names are still very common in low-level programming. Why is this? ...
15 votes
8 answers
6k views

Reverse engineering: what is it really good for? [closed]

I have some innocent/beginner questions: What is reverse engineering good for? As a programmer, should I learn the art of reverse engineering? What are the benefits to a programmer who is ...
2 votes
1 answer
2k views

How to start embedded development for developing a handheld game console? [closed]

I work as a iPhone app developer now, so I know a bit of c, c++ and objective c. Also have fiddled with Java and many other. All of them have been just high level application/games development. My ...
1 vote
5 answers
1k views

What kinds of low level knowledge matter? [closed]

I realize that this question is similar to Low level programming - what's in it for me, but the answers didn't really address my question well. Part from just an understanding, how exactly does your ...
  • 2,587
16 votes
7 answers
65k views

What Are Some Advantages/Disadvantages of Using C over Assembly? [closed]

I'm currently studying engineering in Telecommunications and Electronics and we have migrated from assembler to C in microprocessor programming. I have doubts that this is a good idea. What are some ...
6 votes
4 answers
6k views

Is it possible to automatically convert code from a low level language to a high level language?

I have seen several applications that claim to convert Java code to valid C or even C++. Converting from a high level language to a low level language is possible, no doubt about it. At least in ...
23 votes
9 answers
2k views

What are the complexities of memory-unmanaged programming?

Or in other words, what specific problems did automated garbage collection solve? I've never done low-level programming, so I don't know how complicated can freeing resources get. The kind of bugs ...
  • 3,287