Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
45 views

I want to solve this task: Implement parity bit client number validation. Implement a ParityBitPython class with a validate_client_number(client_number: str) -> bool method to validate 10 digit ...
1 vote
0 answers
383 views

Hi i am working with python serial project i want to change the serial port parity value at runtime it is not working properly especially in odd parity mode it is not sending correct data import ...
0 votes
1 answer
253 views

I have short (assume 24 to 30 bit long) message to send over a noisy channel. Additionally, the channel allows only sending 0 or 1, without "silence", so start transmission marker is needed. ...
2 votes
0 answers
49 views

I’m setting up a private test network using OpenEthereum with authorityRound. I’ve created a new account and added it to the list of validators in the spec.json file, but when I try to unlock it for ...
0 votes
1 answer
2k views

When I launch TeraTerm for use on a serial port (like a USB port), the default (initial) serial settings are 9600 baud rate, 8 data bits, 1 stop bit, and no parity bit. It's possible to change these ...
0 votes
1 answer
101 views

tl;dr - With parity enabled on both sides of a c++ controller and python client, messages don't seem to actually care to validate and wondering if I am missing something to setup or if I need to ...
0 votes
1 answer
111 views

I am unable to answer this question in my homework. Can somebody sample a solution I can reference to understand how to tackle this? Initialize any random word in memory, e.g. 0x55555555. Only Bit 0 ...
0 votes
1 answer
247 views

I'm trying to implement an extended Hamming code encoder after viewing 3Blue1Brown's excellent videos on the subject, and I can't seem to figure out what I'm doing wrong. I have the following code ...
1 vote
1 answer
326 views

I am using atmega32 while learning about communication protocols and i have a question about the parity flag in uart which is set if the received data has a problem with parity. Now i know from the ...
0 votes
1 answer
214 views

I don't know if bubble sort is optimal under the condition that only adjacent swaps are allowed? Is there a more optimal algorithm that can directly determine the parity of the minimum number of swaps ...
0 votes
1 answer
196 views

I'm stumped on this problem: Given an array, check that every number switches from even to odd. All numbers in the array are positive integers. If there is a number that breaks the pattern, return ...
0 votes
0 answers
35 views

I understand the purpose of the pf flag, which is to indicate whether there are an even or odd number of ones in the resulting data after certain instructions manipulate the register. However, It is ...
1 vote
2 answers
107 views

My code doesn't display matrices larger than n>1 #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #define MAX_N 10 int n; int matrix[MAX_N][MAX_N]; bool used[MAX_N * ...
0 votes
0 answers
93 views

I have been trying to figure out the whole shifting process and it just doesn't make sense to me. How does it count the number of bits there were set and the right shift just throws away whatever ...
tomatto's user avatar
  • 149
1 vote
1 answer
2k views

I came across this piece of code on reddit 1 - ((num & 1) << 1) as i32 This code returns 1 for even numbers and -1 for odd numbers. It takes less instructions than other ways of calculating ...

15 30 50 per page
1
2 3 4 5
...
16

AltStyle によって変換されたページ (->オリジナル) /