# Byte Input into Custom Modulator

**URL:** <https://www.ruby-forum.com/t/byte-input-into-custom-modulator/239001>\
**Category:** GNU Radio\
**Created:** [February 7, 2014, 1:25am UTC](https://www.ruby-forum.com/t/byte-input-into-custom-modulator/239001 "2014-02-07T01:25:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [February 7, 2014, 1:25am UTC](https://www.ruby-forum.com/t/byte-input-into-custom-modulator/239001/1 "2014-02-07T01:25:58Z")

</div>

Got a question concerning the byte data type in GNU Radio. I am writing  
my  
own PSK modulator and I am having an issue understanding how the byte  
data  
type appears as I am using it for my input.

I know byte is a char data type in C++ however how does it come in? Is  
it  
the binary data stream of a character? Is it exactly how it is typed in,  
e.g. 1, 3, 5?

I am asking because the test data I am trying to modulate is a series of  
prime numbers in a vector source block. So I am not entirely sure if I  
have  
to do the conversion to binary myself. I have tried to do a file sink to  
see how char data appear but the file is just repeating characters that  
make no sense.

Thanks,

Jon Fox

---

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [February 7, 2014, 1:42am UTC](https://www.ruby-forum.com/t/byte-input-into-custom-modulator/239001/2 "2014-02-07T01:42:22Z")

</div>

On 06.02.2014 16:24, Jonathan F. wrote:

> have to do the conversion to binary myself. I have tried to do a file  
> sink to see how char data appear but the file is just repeating  
> characters that make no sense.

Jonathan,

byte is just that – bytes. If you’re reading from a file, the bytes of  
this file get streamed as-is.

Don’t confuse this with characters / strings! If you write ‘23’ into a  
file, you’ll get two bytes, with the ASCII codes of each character.

Martin

---

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [February 7, 2014, 4:16am UTC](https://www.ruby-forum.com/t/byte-input-into-custom-modulator/239001/3 "2014-02-07T04:16:10Z")

</div>

Answers my question, thank you for the response.

Jon
