Sponsored Content
Full Discussion: Number to bit vector
Top Forums Programming Number to bit vector Post 302967703 by shamrock on Friday 26th of February 2016 03:51:46 PM
Old 02-26-2016
You can convert decimal to binary using bc...there is no need to write a special C program...
Code:
echo "obase=2;1234" | bc

These 2 Users Gave Thanks to shamrock For This Post:
 

6 More Discussions You Might Find Interesting

1. Programming

copying or concatinating string from 1st bit, leaving 0th bit

Hello, If i have 2 strings str1 and str2, i would like to copy/concatenate str2 to str1, from 1st bit leaving the 0th bit. How do i do it? (2 Replies)
Discussion started by: jazz
2 Replies

2. Shell Programming and Scripting

Help needed in converting number to bit

Hi, I have the following file input:- 542 4795 61 543 4795 61 544 0 0 545 292 ... (5 Replies)
Discussion started by: ahjiefreak
5 Replies

3. Programming

Help with bit vector and setting its bits?

void shuffle (card_t cards, card_t cards2, char *bitvec) { int i; unsigned char temp, r; srand(time(NULL)); for (i = 0; i < 52; i++) { r = rand() % 52; temp = bitvec; if (!(temp & (1 << (8- (r % 8))))) { temp |= (1 << (8- (r % 8)));------->is this my problem? } } } ok so I am... (1 Reply)
Discussion started by: bjhum33
1 Replies

4. Shell Programming and Scripting

How to handle 64 bit arithmetic operation at 32 bit compiled perl interpreter?H

Hi, Here is the issue. From the program snippet I have Base: 0x1800000000, Size: 0x3FFE7FFFFFFFF which are of 40 and 56 bits. SO I used use bignum to do the math but summing them up I always failed having correct result. perl interpreter info, perl, v5.8.8 built for... (0 Replies)
Discussion started by: rrd1986
0 Replies

5. Programming

How bit representation of a number can be done in c?

I have an assignment in which a character is the input of which some bits(from a position to certain position) are to be inverted (1's complement) and then the resultant character is to be returned....for example unsigned char x = J from p = 3 to offset n = 5 01001010 inverted to... (1 Reply)
Discussion started by: ezee
1 Replies

6. Windows & DOS: Issues & Discussions

Which version of Windows Vista to install with a product key? 32-bit or 64-bit?

Hello everyone. I bought a dell laptop (XPS M1330) online which came without a hard drive. There is a Windows Vista Ultimate OEMAct sticker with product key at the bottom case. I checked dell website (here) for this model and it says this model supports both 32 and 64-bit version of Windows... (4 Replies)
Discussion started by: milhan
4 Replies
Really Slick ScreenSavers(1)				      General Commands Manual				      Really Slick ScreenSavers(1)

NAME
pixelcity - Procedural city fly through. SYNOPSIS
plasma [--root/-r] [--maxfps/-x number] [--vsync/-y number] [--dpms/-M number] [--effect_none/-n] [--effect_bloom/-b] [--effect_bloom_radial/-B] [--effect_glass/-g] [--effect_color_cycle/-c] [--wireframe/-w] [--letterbox/-l] [--no-fog/-F] DESCRIPTION
From Shamus Young (http://code.google.com/p/pixelcity/): A screensaver for Windows which generates and performs a fly-through of a night- time cityscape. * There are no art assets. All content is generated at runtime. * Aimed at older graphics hardware. The goal is for the program to perform acceptably on machines "five years old or less". * Written in C++ using OpenGL. No fragment or vertex shaders are used. Ported to Linux by Tugrul Galatali. OPTIONS
--root Draw on the root window. --maxfps number Set maximum frame rate. --vsync number Limit redraws to specified number of vertical refreshes. 0 - 100. Default: 1 --dpms number Stop rendering new frames if the display is not on. 0 - 1. Default: 1 --effect_none No scene post processing. --effect_bloom Apply bloom filter to scene. Default. --effect_bloom_radial Apply radial bloom filter to scene. --effect_glass Ethereal rendering of buildings. --effect_color_cycle Buildings glow with alternating colors. --wireframe Render building outlines. --letterbox Wide screen the scene with letter boxing. --no-fog Disable distance fog. ENVIRONMENT
DISPLAY to get the default host and display number. SEE ALSO
X(1), COPYRIGHT
Copyright (C) 2009 by Shamus Young and Tugrul Galatali. Pixel City is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as pub- lished by the Free Software Foundation. Pixel City is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABIL- ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. AUTHOR
Shamus Young <shamus -at- shamusyoung dot com> and Tugrul Galatali <tugrul@galatali.com> X Version 11 Really Slick ScreenSavers(1)
All times are GMT -4. The time now is 06:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy